summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrofl0r <rofl0r@users.noreply.github.com>2020-09-16 20:37:30 +0100
committerrofl0r <rofl0r@users.noreply.github.com>2020-09-16 21:00:50 +0100
commit0ad8904b40d699405f60655606db42475c011b67 (patch)
tree41e442708af5f965d24df989d8e155641c0a375d
parent99ed66cbc47b1fc1ba7572057c0776ccbc6d81d6 (diff)
acl.c: detect invalid ipv6 string
-rw-r--r--src/acl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/acl.c b/src/acl.c
index 75216c3..261b7dd 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -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);
} else {
int i;
+ /* bogus ipv6 ? */
+ if (strchr (location, ':'))
+ return -1;
/*
* At this point we're either a hostname or an