From b452a970ea8771586a95f6a8253536e48a73d3bc Mon Sep 17 00:00:00 2001 From: gandalf Date: Sat, 31 Jan 2004 15:33:55 +0000 Subject: Fix even more possibly not zero-terminated strings after copy (Karsten Desler) --- ip6tables.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ip6tables.c') diff --git a/ip6tables.c b/ip6tables.c index 664b307..16d3ae1 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); -- cgit v1.2.3