You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file(s) you've analysed with pev - simple return 0 compiled by gcc int main() { return 0; }
The command you've used with the files, with all the flags - readpe a.exe
Expected behavior
readpe prints timestamp correctly. Not year 39791743.
Screenshots
Additional context
The issue is in timestamp processing. time_t type is 64-bit on 64-bit system but TimeDateStamp is always 32-bit. So casting TimeDateStamp pointer to time_t pointer cause reading garbage data.
Describe the bug
Date/time stamp:
line from thereadpe
output contains garbage / invalid values.For example:
Despite that timestamp stored in PE binary is just 32-bit number, year 39791743 is behind 32-bit limit.
This happens for 64-bit builds of
readpe
.To Reproduce
Please provide us with:
int main() { return 0; }
Expected behavior
readpe prints timestamp correctly. Not year 39791743.
Screenshots
Additional context
The issue is in timestamp processing.
time_t
type is 64-bit on 64-bit system butTimeDateStamp
is always 32-bit. So casting TimeDateStamp pointer to time_t pointer cause reading garbage data.Simple fix for this issue:
The text was updated successfully, but these errors were encountered: