awkgetline: do not access unitialized data on EOF
authormillert <millert@openbsd.org>
Mon, 1 Nov 2021 18:28:24 +0000 (18:28 +0000)
committermillert <millert@openbsd.org>
Mon, 1 Nov 2021 18:28:24 +0000 (18:28 +0000)
commitc12cd325b0c1e5bcd4411384c65567a7590d42f8
tree51af7cc15745a2904e2dd82d8863872a2901b087
parent3a24a14193a28d08afd2c5cd1f1a308514d4d3c4
awkgetline: do not access unitialized data on EOF
getrec() returns 0 on EOF and leaves the contents of buf unchanged.
From https://github.com/onetrueawk/awk/pull/134
usr.bin/awk/run.c