OcMachoLib: Fix address range check.

This commit is contained in:
Download-Fritz 2018-10-19 23:56:30 +02:00
parent 923cbb6bdb
commit fbc5310bc9

View File

@ -469,7 +469,7 @@ MachoGetSectionByAddress64 (
Segment = MachoGetNextSegment64 (Context, Segment)
) {
if ((Address >= Segment->VirtualAddress)
&& (Address < (Segment->VirtualAddress + Address >= Segment->FileSize))) {
&& (Address < (Segment->VirtualAddress + Segment->Size))) {
Section = &Segment->Sections[0];
for (Index = 0; Index < Segment->NumberOfSections; ++Index) {