diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-09-30 12:35:41 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-09-30 12:35:41 +0000 |
commit | ba6b42942b5780d02ade53e3fa6f4e3845b20c89 (patch) | |
tree | 3975926867acb9081e1a1fd926a3ad681f5dc18b /regress | |
parent | 508cae080035c79a52f2de473d0a90dba322e35a (diff) |
fix the rest of the bug mitigated in the previous commit:
do not embark on an infinite loop
when -m is given and the file contains a NUL character;
OK millert@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/wc/wc.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/regress/usr.bin/wc/wc.sh b/regress/usr.bin/wc/wc.sh index 87b7b8638be..1e52c33d73a 100644 --- a/regress/usr.bin/wc/wc.sh +++ b/regress/usr.bin/wc/wc.sh @@ -56,6 +56,9 @@ test_wc() # single byte characters test_wc "two lines\nand five words\n" " 2 5 25" +# non-printable characters +test_wc "a\033b\000c\n" " 1 1 6" + # multibyte characters test_wc "ax\0314\0200b\n" " 1 1 5" " 1 1 6" test_wc "a\0354\0277\0277b\n" " 1 1 4" \ |