mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 07:26:34 +01:00
fix: panic scanning binaries without symtab (#2739)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
@@ -57,6 +57,9 @@ func machoHasEntrypoint(f *macho.File) bool {
|
||||
}
|
||||
|
||||
func machoHasExports(f *macho.File) bool {
|
||||
if f == nil || f.Symtab == nil {
|
||||
return false
|
||||
}
|
||||
for _, sym := range f.Symtab.Syms {
|
||||
// look for symbols that are:
|
||||
// - not private and are external
|
||||
|
||||
Reference in New Issue
Block a user