mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-26 17:25:04 +01:00
Added method to exploitability class which checks if a given address contains all ascii characters.
BUG=NONE TEST=ExploitabilityTest.TestWindowsEngine Review URL: http://breakpad.appspot.com/207001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@706 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
2b4274afc4
commit
8b2e6865e5
4 changed files with 99 additions and 51 deletions
|
|
@ -90,5 +90,15 @@ Exploitability *Exploitability::ExploitabilityForPlatform(
|
|||
return platform_exploitability;
|
||||
}
|
||||
|
||||
bool Exploitability::AddressIsAscii(u_int64_t address) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
u_int8_t byte = (address >> (8*i)) & 0xff;
|
||||
if ((byte >= ' ' && byte <= '~') || byte == 0)
|
||||
continue;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue