Do not dump core on 'ipfw add unreach': handling null strings in
fill_reject_code(). Please note ipfw/ipfw2.c is not affected. PR: bin/42304 Submitted by: Andy@wantpackets.com MFC after: 1 day
This commit is contained in:
parent
2da3b2ad29
commit
3ec6f79c1e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user