HomeFreeBSD

readelf: check note namesz and descsz

Description

readelf: check note namesz and descsz

Previously corrupt note namesz or descsz (perhaps caused by readelf's
current lack of endian support for notes) resulted in a crash. Check
that namesz and descsz do not extend beyond the end of the buffer before
trying to access name and desc data.

Reported by: jhb
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

Details

Provenance
emasteAuthored on
Parents
rS358636: MFC r355187:
Branches
Unknown
Tags
Unknown