Skip to content

Instantly share code, notes, and snippets.

@mesaleh
Last active August 29, 2015 14:14
Show Gist options
  • Save mesaleh/98f610a4a4adf99d769b to your computer and use it in GitHub Desktop.
Save mesaleh/98f610a4a4adf99d769b to your computer and use it in GitHub Desktop.
Used for my blog entry to describe PEiD vulnerability
int size = getMinSectionSize()
// ** overflow can happen here too
int bound = size + PointerToRawData;
if (bound <= file_size) ACCEPTED;
else INVALID_FILE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment