rmusser01 / pefile

Automatically exported from code.google.com/p/pefile
Other
0 stars 1 forks source link

bug in parse_version_information about fixedfileinfo_offset #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
in pefile, we get fixedfileinfo_offset like this.
        fixedfileinfo_offset = self.dword_align(
            versioninfo_struct.sizeof() + 2 * (len(versioninfo_string) + 
1),
            version_struct.OffsetToData).

But i think this may be wrong, fixedfileinfo_offset is the offset to the 
beginning of VS_VERSIONINFO and round to a 32-bit boundary. 

however, pefile project calculates the offset on this way:
version_struct.OffsetToData plus versioninfo_struct.sizeof() + 2 * (len
(versioninfo_string) + 1) and round to a 32-bit boundary then substract 
version_struct.OffsetToData. under some conditions, this will get a wrong 
result.

VS_FIXEDFILEINFO dwSignature doesnt equals to 0xFEEF04BD no longer.

in the meantime, i submit a file to illustrate this bug.
If we use pefile to get VS_VERSIONINFO ,the result is wrong.

Original issue reported on code.google.com by daiweiwa...@gmail.com on 23 Feb 2010 at 9:30

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ero.carr...@gmail.com on 17 Aug 2010 at 4:59

GoogleCodeExporter commented 9 years ago

Original comment by ero.carr...@gmail.com on 8 Feb 2011 at 11:44

GoogleCodeExporter commented 9 years ago
Fixed in revision 96

Original comment by ero.carr...@gmail.com on 9 Feb 2011 at 11:40