https://git.reactos.org/?p=reactos.git;a=commitdiff;h=18fe055275b903cff6ba2bc9809d2aa213aac581

commit 18fe055275b903cff6ba2bc9809d2aa213aac581
Author:     Hermès Bélusca-Maïto <[email protected]>
AuthorDate: Mon Sep 23 01:53:25 2019 +0200
Commit:     Hermès Bélusca-Maïto <[email protected]>
CommitDate: Sat Feb 1 18:35:40 2020 +0100

    [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)
 

Reply via email to