meds2pdb aborts on proftpd ARM (32 bit) executable
Context: TRMO demo this Monday
Attached is the proftpd executable in question
The abort happens in meds2pdb.cpp, update_functions()
:
query="";
for (auto j = i; j < i + STRIDE; ++j)
{
if (j >= functions.size()) break;
wahoo::Function *f = functions[j];
string functionName = f->getName();
auto functionAddress = f->getAddress();
//int functionSize = f->getSize();
int function_id = f->getFunctionID();
//int outArgsRegionSize = f->getOutArgsRegionSize();
//bool useFP = f->getUseFramePointer();
int insnid=-1; // NOT_IN_DATABASE
// if a function has a valid address, but the address isn't in the table...
if(functionAddress!=0 &&
address_to_instructionid_map.find(functionAddress)==address_to_instructionid_map.end())
{
abort(); // This is the abort
// remove the function from the list of valid functions.
query+="delete from "+functionTable;
query+=" where function_id = " + txn.quote(my_to_string(function_id));
query += ";";
}
@jdh8d for Zipr'ing arm binaries, do we even care about setting up the function tables in the IRDB?