summaryrefslogtreecommitdiffstats
path: root/bin/systrace/filter.c
diff options
context:
space:
mode:
authormpech <mpech@openbsd.org>2003-04-24 09:49:06 +0000
committermpech <mpech@openbsd.org>2003-04-24 09:49:06 +0000
commitac47c76ef287813ab12d5978ed8659ad8f46deac (patch)
tree297aee0c68c5b489f7308d4cd23896d67111df4b /bin/systrace/filter.c
parentfix bounds for strlcpy. pr3228 from Jan Johansson (diff)
downloadwireguard-openbsd-ac47c76ef287813ab12d5978ed8659ad8f46deac.tar.xz
wireguard-openbsd-ac47c76ef287813ab12d5978ed8659ad8f46deac.zip
fix for EOF in interactive policy generation.
millert@ provos@
Diffstat (limited to 'bin/systrace/filter.c')
-rw-r--r--bin/systrace/filter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/systrace/filter.c b/bin/systrace/filter.c
index 888f094a548..3737b722767 100644
--- a/bin/systrace/filter.c
+++ b/bin/systrace/filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: filter.c,v 1.24 2002/12/09 07:24:56 itojun Exp $ */
+/* $OpenBSD: filter.c,v 1.25 2003/04/24 09:49:06 mpech Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -541,7 +541,8 @@ filter_ask(int fd, struct intercept_tlq *tls, struct filterq *fls,
}
}
- fgets(line, sizeof(line), stdin);
+ if (fgets(line, sizeof(line), stdin) == NULL)
+ errx(1, "EOF");
p = line;
strsep(&p, "\n");
} else if (!first) {