HomeFreeBSD

linker: Handle a truncated hints file properly

Description

linker: Handle a truncated hints file properly

If vattr.va_size is 0, we will end up accessing invalid memory. This is
mostly harmless (because malloc(0) still allocates some memory), but it
triggers a KASAN report.

PR: 282268
Reviewed by: christos, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47240

Details

Provenance
markjAuthored on Oct 23 2024, 4:54 PM
Reviewer
christos
Differential Revision
D47240: linker: Handle a truncated hints file properly
Parents
rGdab59af3bcc7: Canonicalize the name of the FreeBSD Foundation
Branches
Unknown
Tags
Unknown