From: Karsten Desler Date: Sat, 31 Jan 2004 15:14:38 +0000 (+0000) Subject: Fix another possibly not zero-terminated string after copy (Karsten Desler) X-Git-Tag: v1.3.0-rc1~143 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=617b7dd9ef2870e85694ad5212c61fa7c5986ec9;p=thirdparty%2Fiptables.git Fix another possibly not zero-terminated string after copy (Karsten Desler) --- diff --git a/iptables.c b/iptables.c index dc702608..c438d604 100644 --- a/iptables.c +++ b/iptables.c @@ -634,6 +634,7 @@ parse_hostnetworkmask(const char *name, struct in_addr **addrpp, int i, j, k, n; strncpy(buf, name, sizeof(buf) - 1); + buf[sizeof(buf) - 1] = '\0'; if ((p = strrchr(buf, '/')) != NULL) { *p = '\0'; addrp = parse_mask(p + 1);