Skip to content

Commit f5cd80f

Browse files
Bugs fixed.
1 parent 5a57678 commit f5cd80f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

PEParser/PEParser.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,12 +870,14 @@ void PEParser::GetPESections() {
870870
_PESections.reserve(count);
871871

872872
for (WORD i = 0; i < count; i++) {
873-
_PESections[i]._normalSize = _sections[i].Misc.VirtualSize;
874-
_PESections[i]._dataSize = _sections[i].Misc.VirtualSize;
875873
if (_isFileMap) {
874+
_PESections[i]._normalSize = _sections[i].SizeOfRawData;
875+
_PESections[i]._dataSize = _sections[i].SizeOfRawData;
876876
offset = _sections[i].PointerToRawData;
877877
}
878878
else {
879+
_PESections[i]._normalSize = _sections[i].Misc.VirtualSize;
880+
_PESections[i]._dataSize = _sections[i].Misc.VirtualSize;
879881
offset = _sections[i].VirtualAddress;
880882
}
881883
GetPESectionData(offset, _PESections[i]);

0 commit comments

Comments
 (0)