summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
authorKarsten Desler <kdesler@soohrt.org>2004-01-31 13:22:18 +0000
committerMartin Josefsson <gandalf@wlug.westbo.se>2004-01-31 13:22:18 +0000
commit9cc354fb9cf898ef78e7e817a0464c60dbed3b6e (patch)
treea153ccbe02a71f78e29247f2f13cb8e9c27b2c49 /iptables.c
parent867f4db6d500b9981bba8e8ec52a097ed6f6dd89 (diff)
Fix possibly not zero-terminated string after copy (Karsten Desler)
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c1
1 files changed, 1 insertions, 0 deletions
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;