OcMachoLib: Verify found symbol is a MCP before returning.
@@ -529,9 +529,15 @@ MachoGetMetaclassSymbolFromSmcpSymbol64 (
Smcp->Value,
&Symbol
);
+ if (Result && (Symbol != NULL)) {
+ Result = MachoSymbolNameIsMetaclassPointer64 (
+ Context,
+ MachoGetSymbolName64 (Context, Symbol)
+ );
if (Result) {
return Symbol;
}
+ }
return NULL;
}
