fix(apple): validate dylib candidates and preserve search uncertainty (#1100)
* fix(apple): validate dylib candidates and preserve search uncertainty * fix(apple): scope embedded dyld uncertainty by search phase * fix(apple): scope dyld prefixes to eligible paths and platforms * fix(apple): ignore embedded process settings on library roots
This commit is contained in:
@@ -331,6 +331,11 @@ const decodeCommands = (
|
||||
decodeCommand(command, body, index, slice);
|
||||
offset += size;
|
||||
}
|
||||
if (offset !== bytes.byteLength)
|
||||
throw new MachoFormatIssue(
|
||||
"malformed",
|
||||
`load commands declare ${header.commandCount} commands but sizeofcmds holds ${bytes.byteLength} bytes`,
|
||||
);
|
||||
return slice;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user