fix review issues

This commit is contained in:
Zeke Lu 2022-09-15 11:50:28 +08:00
parent b7b8c37ca3
commit aeb70ca8a0
1 changed files with 1 additions and 1 deletions

View File

@ -481,7 +481,7 @@ func NewFile(r io.ReaderAt) (*File, error) {
}
shstr := f.Sections[shstrndx]
if shstr.Type != SHT_STRTAB {
return nil, &FormatError{0, "invalid (pointing to non SHT_STRTAB section) ELF shstrndx", shstrndx}
return nil, &FormatError{shoff + int64(shstrndx*shentsize), "invalid ELF section name string table type", shstr.Type}
}
shstrtab, err := shstr.Data()
if err != nil {