summaryrefslogtreecommitdiff
path: root/rts/linker/PEi386.c
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2019-12-20 23:05:57 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-06 18:38:37 -0500
commit5ffea0c6c6a2670fd6819540f3ea61ce6620caaa (patch)
treea41c3f5bc6b57d72d0d9fdb00af4109aaf6c657e /rts/linker/PEi386.c
parent4056b9666a0fc5865a82fbba03e8312d7900ac5b (diff)
downloadhaskell-5ffea0c6c6a2670fd6819540f3ea61ce6620caaa.tar.gz
Fix overflow.
Diffstat (limited to 'rts/linker/PEi386.c')
-rw-r--r--rts/linker/PEi386.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c
index 81308779a1..d57b2cbb12 100644
--- a/rts/linker/PEi386.c
+++ b/rts/linker/PEi386.c
@@ -1255,7 +1255,7 @@ ocVerifyImage_PEi386 ( ObjectCode* oc )
*/
COFF_reloc* rel = (COFF_reloc*)
myindex ( sizeof_COFF_reloc, reltab, 0 );
- noRelocs = rel->VirtualAddress;
+ noRelocs = rel->VirtualAddress - 1;
relocs_offset = 1;
} else {
noRelocs = sectab_i->NumberOfRelocations;