OcMachoLib: Retrieve symbol section via Section instead of Value.

This commit is contained in:
Download-Fritz 2019-03-26 23:15:47 +01:00
parent 2ac0ee8085
commit bbea9dba45

View File

@ -555,7 +555,11 @@ MachoRelocateSymbol64 (
// Symbols are relocated when they describe sections.
//
if (MachoSymbolIsSection (Symbol)) {
Section = MachoGetSectionByAddress64 (Context, Symbol->Value);
if (Symbol->Section > MAX_SECT) {
return FALSE;
}
Section = MachoGetSectionByIndex64 (Context, (Symbol->Section - 1));
if (Section == NULL) {
return FALSE;
}