Last active
August 29, 2015 14:14
-
-
Save mesaleh/86454cf3f2dda19d166f to your computer and use it in GitHub Desktop.
Used for my blog entry to describe PEiD vulnerability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// getting the exact size of the section | |
int getMinSectionSize() | |
{ | |
int size = min(VirtualSize, SizeOfRawData) | |
// ** if PointerToRawData is negative, overflow will happen here. | |
int bound = file_size - PointerToRawData | |
if (size <= bound) return size; | |
else size = bound; | |
return size; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment