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 awk: allow string as exit status 2017-08-12 21:34:06 +02:00
awkgram.y awk: allow string as exit status 2017-08-12 21:34:06 +02:00
lex.c awk: allow string as exit status 2017-08-12 21:34:06 +02:00
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 awk: handle bad/incomplete input in maketab (thanks kenji arisawa) 2017-06-02 19:03:37 +02:00
mkfile awk: fix race condition with sub-mk in mkfile 2020-05-24 16:00:45 +02:00
parse.c awk: allow string as exit status 2017-08-12 21:34:06 +02:00
popen.c remove ape regexp library, add utility for awk native port 2016-04-27 07:52:41 -05:00
proto.h awk: bring back ENVIRON[] support 2016-05-02 00:34:23 +02:00
re.c New libregexp and APE ported to native 2016-04-26 22:23:44 -05:00
run.c awk: fix off-by-one string buffer overflow from gsub 2022-03-12 12:29:15 +00:00
tran.c awk: bring back ENVIRON[] support 2016-05-02 00:34:23 +02:00