summaryrefslogtreecommitdiffstats
path: root/ip6tables.c
diff options
context:
space:
mode:
authorgandalf <gandalf>2004-01-31 15:33:55 +0000
committergandalf <gandalf>2004-01-31 15:33:55 +0000
commitb452a970ea8771586a95f6a8253536e48a73d3bc (patch)
treeb29bb39cfef731e863db577f1ff161e4bf5d3f5f /ip6tables.c
parent32be9ea0651809e288d7f44550b2eed7ba582575 (diff)
Fix even more possibly not zero-terminated strings after copy (Karsten Desler)
Diffstat (limited to 'ip6tables.c')
-rw-r--r--ip6tables.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ip6tables.c b/ip6tables.c
index 664b307..16d3ae1 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -675,6 +675,7 @@ parse_hostnetworkmask(const char *name, struct in6_addr **addrpp,
int i, j, n;
strncpy(buf, name, sizeof(buf) - 1);
+ buf[sizeof(buf) - 1] = '\0';
if ((p = strrchr(buf, '/')) != NULL) {
*p = '\0';
addrp = parse_mask(p + 1);