From 8d1b702903d863eee02a6b7a8e7a921d75682656 Mon Sep 17 00:00:00 2001 From: sagitario Date: Wed, 24 Sep 2014 20:28:35 +0000 Subject: Ticket #15: Crash when parsing .reloc structure --- src/dwarf2pdb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dwarf2pdb.cpp b/src/dwarf2pdb.cpp index feeab8c..13bb426 100644 --- a/src/dwarf2pdb.cpp +++ b/src/dwarf2pdb.cpp @@ -1716,9 +1716,9 @@ bool CV2PDB::relocateDebugLineInfo() char* p = img.RVA (virtadr, 1); if(p >= img.debug_line && p < img.debug_line + img.debug_line_length) { - for (unsigned int p = 8; p < chksize; p += 2) + for (unsigned int w = 8; w < chksize; w += 2) { - unsigned short entry = *(unsigned short*)(relocbase + p); + unsigned short entry = *(unsigned short*)(relocbase + w); unsigned short type = (entry >> 12) & 0xf; unsigned short off = entry & 0xfff; -- cgit v0.12