Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debug/elf: perform stricter section header table checks in NewFile
If an ELF file has no section header table (shoff = 0), shnum must be zero as well according to elf(5). So far, when only shnum was zero but shoff was non-zero (i.e. in an invalid ELF file) shstrndx wasn't properly checked and could result in an 'index out of range' later on. Fixes #10996 Change-Id: Ic248d2d77099b0036458e2a844b086a5f463c844 Reviewed-on: https://go-review.googlesource.com/c/162857 Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information