CasualX / pelite

Lightweight, memory-safe, zero-allocation library for reading and navigating PE binaries.
MIT License
280 stars 42 forks source link

expanded IMAGE_LOAD_CONFIG_DIRECTORY structs #273

Open Ben-Lichtman opened 11 months ago

Ben-Lichtman commented 11 months ago

IMAGE_LOAD_CONFIG_DIRECTORY32 and IMAGE_LOAD_CONFIG_DIRECTORY64 did not have all their fields included, so I have added them

Ben-Lichtman commented 11 months ago

Note that this involved changing some of the const assertions made at the bottom of image.rs

Ben-Lichtman commented 11 months ago

Also note that I have taken these fields from the windows crate eg. https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/Diagnostics/Debug/struct.IMAGE_LOAD_CONFIG_DIRECTORY64.html

Ben-Lichtman commented 11 months ago

Note: this also adds the packed(4) attribute to IMAGE_LOAD_CONFIG_DIRECTORY64, since this struct may be 4 byte aligned according to the windows SDK eg. https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.16299.0/km/ntimage.h#L1746 - This is a breaking change to the pelite API