diff options
author | Karsten Desler <kdesler@soohrt.org> | 2004-01-31 13:22:18 +0000 |
---|---|---|
committer | Martin Josefsson <gandalf@wlug.westbo.se> | 2004-01-31 13:22:18 +0000 |
commit | 9cc354fb9cf898ef78e7e817a0464c60dbed3b6e (patch) | |
tree | a153ccbe02a71f78e29247f2f13cb8e9c27b2c49 | |
parent | 867f4db6d500b9981bba8e8ec52a097ed6f6dd89 (diff) |
Fix possibly not zero-terminated string after copy (Karsten Desler)
-rw-r--r-- | iptables.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |