mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
ipfw: guard against NULL deref with clat/plat prefixes without length
Found with: Claude Code Sonnet 5 MFC after: 2 weeks
This commit is contained in:
1 parent
6ac71529b2
commit
47b02ace19
1 file changed
+3
@@ -208,6 +208,9 @@ nat64clat_create(const char *name, uint8_t set, int ac, char *av[])
|
||||
|
||||
if ((p = strchr(*av, '/')) != NULL)
|
||||
*p++ = '\0';
|
||||
else
|
||||
errx(EX_USAGE,
|
||||
"Prefix length required: %s", *av);
|
||||
if (inet_pton(AF_INET6, *av, &prefix) != 1)
|
||||
errx(EX_USAGE,
|
||||
"Bad prefix: %s", *av);
|
||||
|
||||
Reference in new issue
Block a user