Don't display empty error context.
Context extraction didn't handle this case and showed uninitialized memory. Obtained from: OpenBSD lib.c 1.21 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D12379
This commit is contained in:
parent
8e537f8ae0
commit
d12420d872
@ -617,7 +617,7 @@ void eprint(void) /* try to print context around error */
|
||||
static int been_here = 0;
|
||||
extern char ebuf[], *ep;
|
||||
|
||||
if (compile_time == 2 || compile_time == 0 || been_here++ > 0)
|
||||
if (compile_time == 2 || compile_time == 0 || been_here++ > 0 || ebuf == ep)
|
||||
return;
|
||||
p = ep - 1;
|
||||
if (p > ebuf && *p == '\n')
|
||||
|
Loading…
Reference in New Issue
Block a user