freebsd-src/usr.bin/grep
Kyle Evans 9c170b3d52 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

(cherry picked from commit e116e040f3)
2023-11-25 22:07:17 -06:00
..
tests Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
file.c grep: Suppress EISDIR when reading. 2023-09-14 16:59:52 +02:00
grep.1 Remove $FreeBSD$: one-line nroff pattern 2023-08-23 11:43:32 -06:00
grep.c Remove $FreeBSD$: one-line .c pattern 2023-08-23 11:43:26 -06:00
grep.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
queue.c Remove $FreeBSD$: one-line .c pattern 2023-08-23 11:43:26 -06:00
util.c grep: don't rely on implementation-defined malloc(0) behavior 2023-11-25 22:07:17 -06:00
zgrep.1 Remove $FreeBSD$: two-line nroff pattern 2023-08-23 11:43:31 -06:00
zgrep.sh Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00