Fix getSectionHeader()
This commit is contained in:
parent
b323612508
commit
4e042166b9
|
@ -114,7 +114,7 @@ namespace de4dot.code.PE {
|
||||||
SectionHeader getSectionHeader(uint rva) {
|
SectionHeader getSectionHeader(uint rva) {
|
||||||
for (int i = 0; i < sectionHeaders.Length; i++) {
|
for (int i = 0; i < sectionHeaders.Length; i++) {
|
||||||
var section = sectionHeaders[i];
|
var section = sectionHeaders[i];
|
||||||
if (section.virtualAddress <= rva && rva < section.virtualAddress + section.virtualSize)
|
if (section.virtualAddress <= rva && rva < section.virtualAddress + Math.Max(section.virtualSize, section.sizeOfRawData))
|
||||||
return section;
|
return section;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user