[INCLUDE:HOST] Revert a bug that has been sneaked in by Arch Blackmann in 9e9ba41f (r36910) :P

The "TypeOffset" thing was just an informative comment to tell that the
data that follows after the IMAGE_BASE_RELOCATION header is an arbitrary
array of WORDs describing packed (Type + Offset)s.

Having the header structure containing that spurious "TypeOffset" was
breaking all the code that was basing on expected size of the
IMAGE_BASE_RELOCATION structure in order to apply relocations (typically
this would mean that the first 2 relocations described by it would not
be applied).

Hopefully this bug only hit the host-tools, and not the OS itself :)
This commit is contained in:
Hermès Bélusca-Maïto 2019-09-23 01:53:25 +02:00
parent 0f4f29d2ca
commit 18fe055275
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -202,7 +202,7 @@ typedef struct _IMAGE_SECTION_HEADER {
typedef struct _IMAGE_BASE_RELOCATION {
DWORD VirtualAddress;
DWORD SizeOfBlock;
WORD TypeOffset[1];
// Followed by: WORD TypeOffset[ANYSIZE_ARRAY];
} IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION;
#pragma pack(pop)