summaryrefslogtreecommitdiff
path: root/sys/src/9/ip
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-03-12 12:29:15 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-03-12 12:29:15 +0000
commitc14ea9fdd1521ff9322f9af71b801e016622c0cd (patch)
treee2ae5bf408e1ee2e341eed60f55ee95fa4e86598 /sys/src/9/ip
parentaf6f03e52829a571f1fa3d61c0bfa09a1c89ea36 (diff)
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.
Diffstat (limited to 'sys/src/9/ip')
0 files changed, 0 insertions, 0 deletions