From 18fe055275b903cff6ba2bc9809d2aa213aac581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 23 Sep 2019 01:53:25 +0200 Subject: [PATCH] [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 :) --- sdk/include/host/pecoff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/include/host/pecoff.h b/sdk/include/host/pecoff.h index 42bc0bf4cfe..14e267c9662 100644 --- a/sdk/include/host/pecoff.h +++ b/sdk/include/host/pecoff.h @@ -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)