diff options
Diffstat (limited to 'ip6tables.c')
-rw-r--r-- | ip6tables.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ip6tables.c b/ip6tables.c index 664b307b..16d3ae17 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -675,6 +675,7 @@ parse_hostnetworkmask(const char *name, struct in6_addr **addrpp, int i, j, n; strncpy(buf, name, sizeof(buf) - 1); + buf[sizeof(buf) - 1] = '\0'; if ((p = strrchr(buf, '/')) != NULL) { *p = '\0'; addrp = parse_mask(p + 1); |