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
Found a case where a PE section parser was thrown off by a mismatch between section's raw size and its virtual size. It would read the section bytes sequentially, encounter the padding zeroes in the end, and crash.
PE stores the size of the section in a loaded PE file in the second field of the section header, VirtualSize. Maybe the library should initialize section.bytes with a VirtualSize-sized blob instead. Note the case where VirtualSize is greater than SizeOfRawData ; in those cases the bytes should be zero padded.
Found a case where a PE section parser was thrown off by a mismatch between section's raw size and its virtual size. It would read the section bytes sequentially, encounter the padding zeroes in the end, and crash.
PE stores the size of the section in a loaded PE file in the second field of the section header,
VirtualSize
. Maybe the library should initializesection.bytes
with aVirtualSize
-sized blob instead. Note the case whereVirtualSize
is greater thanSizeOfRawData
; in those cases the bytes should be zero padded.The filebytes library surfaces that field as
PhysicalAddress_or_VirtualSize
. The doc at https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#section-table-section-headers doesn't mention the circumstances when this field can meanPhysicalAddress
, but maybe the maintainers know something I don't.The text was updated successfully, but these errors were encountered: