Fix for Windows exceptions

develop
Petr Mrázek 2010-02-28 19:59:07 +01:00
parent fa878f2e9d
commit c4cb3afd0b
3 changed files with 19 additions and 4 deletions

@ -230,7 +230,15 @@ SHMProcess::SHMProcess(vector <memory_info *> & known_versions)
vector<memory_info *>::iterator it; vector<memory_info *>::iterator it;
for ( it=known_versions.begin() ; it < known_versions.end(); it++ ) for ( it=known_versions.begin() ; it < known_versions.end(); it++ )
{ {
uint32_t pe_timestamp = (*it)->getHexValue("pe_timestamp"); uint32_t pe_timestamp;
try
{
pe_timestamp = (*it)->getHexValue("pe_timestamp");
}
catch(Error::MissingMemoryDefinition& e)
{
continue;
}
if (pe_timestamp == pe_header.FileHeader.TimeDateStamp) if (pe_timestamp == pe_header.FileHeader.TimeDateStamp)
{ {
memory_info *m = new memory_info(**it); memory_info *m = new memory_info(**it);

@ -91,9 +91,16 @@ NormalProcess::NormalProcess(uint32_t pid, vector <memory_info *> & known_versio
// filter by OS // filter by OS
if(memory_info::OS_WINDOWS != (*it)->getOS()) if(memory_info::OS_WINDOWS != (*it)->getOS())
continue; continue;
uint32_t pe_timestamp;
// filter by timestamp // filter by timestamp, skip entries without a timestamp
uint32_t pe_timestamp = (*it)->getHexValue("pe_timestamp"); try
{
pe_timestamp = (*it)->getHexValue("pe_timestamp");
}
catch(Error::MissingMemoryDefinition& e)
{
continue;
}
if (pe_timestamp != pe_header.FileHeader.TimeDateStamp) if (pe_timestamp != pe_header.FileHeader.TimeDateStamp)
continue; continue;

Binary file not shown.