Correct bad os-type attributes in symbols.xml

develop
lethosor 2018-01-14 22:56:35 -05:00
parent ce1644d655
commit c3bf14a300
2 changed files with 15 additions and 3 deletions

@ -1619,6 +1619,18 @@ bool Core::Init()
} }
cerr << "Version: " << vinfo->getVersion() << endl; cerr << "Version: " << vinfo->getVersion() << endl;
#if defined(_WIN32)
const OSType expected = OS_WINDOWS;
#elif defined(_DARWIN)
const OSType expected = OS_APPLE;
#else
const OSType expected = OS_LINUX;
#endif
if (expected != vinfo->getOS()) {
cerr << "OS mismatch; resetting to " << int(expected) << endl;
vinfo->setOS(expected);
}
// Init global object pointers // Init global object pointers
df::global::InitGlobals(); df::global::InitGlobals();
alias_mutex = new recursive_mutex(); alias_mutex = new recursive_mutex();

@ -153,7 +153,7 @@ void VersionInfoFactory::ParseVersion (TiXmlElement* entry, VersionInfo* mem)
else if (type == "md5-hash") else if (type == "md5-hash")
{ {
const char *cstr_value = pMemEntry->Attribute("value"); const char *cstr_value = pMemEntry->Attribute("value");
fprintf(stderr, "%s: MD5: %s\n", cstr_name, cstr_value); fprintf(stderr, "%s (%s): MD5: %s\n", cstr_name, cstr_os, cstr_value);
if(!cstr_value) if(!cstr_value)
throw Error::SymbolsXmlUnderspecifiedEntry(cstr_name); throw Error::SymbolsXmlUnderspecifiedEntry(cstr_name);
mem->addMD5(cstr_value); mem->addMD5(cstr_value);
@ -161,7 +161,7 @@ void VersionInfoFactory::ParseVersion (TiXmlElement* entry, VersionInfo* mem)
else if (type == "binary-timestamp") else if (type == "binary-timestamp")
{ {
const char *cstr_value = pMemEntry->Attribute("value"); const char *cstr_value = pMemEntry->Attribute("value");
fprintf(stderr, "%s: PE: %s\n", cstr_name, cstr_value); fprintf(stderr, "%s (%s): PE: %s\n", cstr_name, cstr_os, cstr_value);
if(!cstr_value) if(!cstr_value)
throw Error::SymbolsXmlUnderspecifiedEntry(cstr_name); throw Error::SymbolsXmlUnderspecifiedEntry(cstr_name);
mem->addPE(strtol(cstr_value, 0, 16)); mem->addPE(strtol(cstr_value, 0, 16));