HomeFreeBSD

grep: don't rely on implementation-defined malloc(0) behavior

Description

grep: don't rely on implementation-defined malloc(0) behavior

The very few places that rely on malloc/calloc of a zero-size region
won't attempt to dereference it, so just return NULL rather than rolling
the dice with the underlying malloc implementation.

Reported by: brooks, Shawn Webb

Details

Provenance
kevansAuthored on Nov 5 2023, 2:08 AM
Parents
rG13a974574670: crashinfo: remove unused /usr/bin/gdb support
Branches
Unknown
Tags
Unknown