summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/ipfw/ipfw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index 9a87b09..c4f00fd 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -1063,6 +1063,8 @@ fill_reject_code(u_short *codep, char *str)
u_long val;
char *s;
+ if (str == '\0')
+ errx(EX_DATAERR, "missing unreachable code");
val = strtoul(str, &s, 0);
if (s != str && *s == '\0' && val < 0x100) {
*codep = val;
OpenPOWER on IntegriCloud