acl.c: detect invalid ipv6 string

This commit is contained in:
rofl0r 2020-09-16 20:37:30 +01:00
parent 99ed66cbc4
commit 0ad8904b40

View File

@ -163,6 +163,9 @@ insert_acl (char *location, acl_access_t access_type, acl_list_t *access_list)
memset (acl.address.ip.mask, 0xff, IPV6_LEN); memset (acl.address.ip.mask, 0xff, IPV6_LEN);
} else { } else {
int i; int i;
/* bogus ipv6 ? */
if (strchr (location, ':'))
return -1;
/* /*
* At this point we're either a hostname or an * At this point we're either a hostname or an