From 9cc354fb9cf898ef78e7e817a0464c60dbed3b6e Mon Sep 17 00:00:00 2001 From: Karsten Desler Date: Sat, 31 Jan 2004 13:22:18 +0000 Subject: Fix possibly not zero-terminated string after copy (Karsten Desler) --- iptables.c | 1 + 1 file changed, 1 insertion(+) (limited to 'iptables.c') diff --git a/iptables.c b/iptables.c index 21c9e49d..dc702608 100644 --- a/iptables.c +++ b/iptables.c @@ -268,6 +268,7 @@ dotted_to_addr(const char *dotted) /* copy dotted string, because we need to modify it */ strncpy(buf, dotted, sizeof(buf) - 1); + buf[sizeof(buf) - 1] = '\0'; addrp = (unsigned char *) &(addr.s_addr); p = buf; -- cgit v1.2.3