From 9a0d240ea43b799144ba14fdf8428cd96bdbe727 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 26 Jun 2004 11:23:32 +0000 Subject: [PATCH] Stop at the real end of the relocation table. svn path=/trunk/; revision=9881 --- reactos/lib/ntdll/ldr/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/lib/ntdll/ldr/utils.c b/reactos/lib/ntdll/ldr/utils.c index 1200f1cc98f..e5c86e75217 100644 --- a/reactos/lib/ntdll/ldr/utils.c +++ b/reactos/lib/ntdll/ldr/utils.c @@ -1,4 +1,4 @@ -/* $Id: utils.c,v 1.92 2004/06/25 19:05:20 ekohl Exp $ +/* $Id: utils.c,v 1.93 2004/06/26 11:23:32 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -1289,6 +1289,7 @@ LdrPerformRelocations(PIMAGE_NT_HEADERS NTHeaders, RelocationRVA += RelocationDir->SizeOfBlock; RelocationDir = (PRELOCATION_DIRECTORY) (ImageBase + RelocationRVA); + RelocationBlockOffset += RelocationDir->SizeOfBlock; continue; } @@ -1333,6 +1334,7 @@ LdrPerformRelocations(PIMAGE_NT_HEADERS NTHeaders, return(Status); } } + for (i = 0; i < NumberOfEntries; i++) { Offset = (RelocationBlock[i].TypeOffset & 0xfff);