Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ldelf: fix crash when hash-style is sysv
This issue afects binaryes using the sysv style hash table (-WL,hash-style=sysv) When the "nbuckets" filed in the hash table (.hash) is set to 0, ldelf will do out-of-bounds indexing and crash with a data abort. Such a hash table is strange but GCC 13.3.0 seems to produce them in some cases anyway. This fix returns an error is nbuckets is 0 before using the value, and makes an affected S-EL0 SP binary load fine. Signed-off-by: Gyorgy Szing <[email protected]> Reviewed-by: Jens Wiklander <[email protected]> Reviewed-by: Jerome Forissier <[email protected]>
- Loading branch information