plan9fox/sys/src/cmd/awk
cinap_lenrek c14ea9fdd1 awk: fix off-by-one string buffer overflow from gsub
the bug happens when we did the fast exit thru "done" label,
where we would not make sure that theres space in the buffer
for the NUL terminator.

instead, avoid the fast exit and always do the final
adjbuf() that makes sure we have space for the NUL terminator.

remove the pointless pb checks, they'r wrong (should'v
been bp >= buf+bufsz) and adjbuf() already makes sure this
can never happen.
2022-03-12 12:29:15 +00:00
..
awk.h
awkgram.y
lex.c
lib.c awk: make empty FS unicodely-correct. 2019-10-09 17:36:02 -07:00
main.c improve usage messages (thanks henesy) 2020-03-10 10:09:34 -07:00
maketab.c
mkfile awk: fix race condition with sub-mk in mkfile 2020-05-24 16:00:45 +02:00
parse.c
popen.c
proto.h
re.c
run.c awk: fix off-by-one string buffer overflow from gsub 2022-03-12 12:29:15 +00:00
tran.c