diff options
author | 2003-09-18 22:29:30 +0000 | |
---|---|---|
committer | 2003-09-18 22:29:30 +0000 | |
commit | 350454cf8618838d87fa68e3cde20c313f2230d8 (patch) | |
tree | 1d2354ebfec74313fdc9e3ad230d25e69955fa8a /usr.bin/grep/binary.c | |
parent | if length is 1, don't try to null memory that doesn't belong to us. (diff) | |
download | wireguard-openbsd-350454cf8618838d87fa68e3cde20c313f2230d8.tar.xz wireguard-openbsd-350454cf8618838d87fa68e3cde20c313f2230d8.zip |
make this test look for spaces as well, to match other cases
ok fgs@ ok deraadt@
Diffstat (limited to 'usr.bin/grep/binary.c')
-rw-r--r-- | usr.bin/grep/binary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/binary.c b/usr.bin/grep/binary.c index 82ffe94b499..84805714355 100644 --- a/usr.bin/grep/binary.c +++ b/usr.bin/grep/binary.c @@ -1,4 +1,4 @@ -/* $OpenBSD: binary.c,v 1.8 2003/09/07 07:53:44 tedu Exp $ */ +/* $OpenBSD: binary.c,v 1.9 2003/09/18 22:29:30 beck Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -66,7 +66,7 @@ gzbin_file(gzFile *f) return 0; for (i = 0; i < m; i++) - if (!isprint(buf[i])) + if (!isprint(buf[i]) && !isspace(buf[i])) return 1; gzrewind(f); |