aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/locate
diff options
context:
space:
mode:
authorWolfram Schneider <wosch@FreeBSD.org>2022-01-31 18:04:45 +0000
committerWolfram Schneider <wosch@FreeBSD.org>2022-01-31 18:04:45 +0000
commit00ad40d70a67f0dd8c18d30ff3d0290f924b2ac8 (patch)
tree4173efbc02eaf0849d6fbd5d23ecca005b0a10f2 /usr.bin/locate
parent834a8fa1694db39a356f1732d78f39ff76da422c (diff)
downloadsrc-00ad40d70a67f0dd8c18d30ff3d0290f924b2ac8.tar.gz
src-00ad40d70a67f0dd8c18d30ff3d0290f924b2ac8.zip
Diffstat (limited to 'usr.bin/locate')
-rw-r--r--usr.bin/locate/bigram/locate.bigram.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/locate/bigram/locate.bigram.c b/usr.bin/locate/bigram/locate.bigram.c
index a654448680a3..c6b2d921fdf0 100644
--- a/usr.bin/locate/bigram/locate.bigram.c
+++ b/usr.bin/locate/bigram/locate.bigram.c
@@ -103,6 +103,9 @@ main(void)
oldpath = buf2;
}
}
+ if (!feof(stdin) || ferror(stdin))
+ err(1, "stdin");
+
/* output, boundary check */
for (i = ASCII_MIN; i <= ASCII_MAX; i++)