From cd9735fb78524e6dcb4111db4c2f0f4a7ddaad9b Mon Sep 17 00:00:00 2001 From: gandalf 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 21c9e49..dc70260 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