From b3f63ce7ae8e718c7fddd09171110a91822faa25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Moln=C3=A1r?= Date: Sun, 9 Mar 2014 23:55:28 +0100 Subject: [PATCH] pe: fix a bug in pack0() for arm --- src/pefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pefile.cpp b/src/pefile.cpp index f47fc24f..4235c2a4 100644 --- a/src/pefile.cpp +++ b/src/pefile.cpp @@ -2412,7 +2412,6 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, { osection[1].vsize = osection[1].size; osection[2].vsize = osection[2].size; - oh.imagesize = (osection[3].vaddr + osection[3].vsize + oam1) &~ oam1; osection[0].rawdataptr = 0; osection[1].rawdataptr = (pe_offset + sizeof(oh) + sizeof(osection) + fam1) &~ fam1; } @@ -2431,6 +2430,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, osection[3].rawdataptr = osection[2].rawdataptr + osection[2].size; osection[2].flags = (unsigned) (PEFL_DATA|PEFL_READ); osection[3].flags = (unsigned) (PEFL_DATA|PEFL_READ); + oh.imagesize = (osection[3].vaddr + osection[3].vsize + oam1) &~ oam1; if (soresources == 0) { oh.objects = 3;