summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
authorgandalf <gandalf>2004-01-31 15:14:38 +0000
committergandalf <gandalf>2004-01-31 15:14:38 +0000
commit32be9ea0651809e288d7f44550b2eed7ba582575 (patch)
tree0bb77e21798a837c90190b7e630f1b3d48a0753c /iptables.c
parentcd9735fb78524e6dcb4111db4c2f0f4a7ddaad9b (diff)
Fix another 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 dc70260..c438d60 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);