summaryrefslogtreecommitdiffstats
path: root/ip6tables-restore.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-restore.c
parent32be9ea0651809e288d7f44550b2eed7ba582575 (diff)
Fix even more possibly not zero-terminated strings after copy (Karsten Desler)
Diffstat (limited to 'ip6tables-restore.c')
-rw-r--r--ip6tables-restore.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ip6tables-restore.c b/ip6tables-restore.c
index cc60e23..89ef79d 100644
--- a/ip6tables-restore.c
+++ b/ip6tables-restore.c
@@ -7,7 +7,7 @@
* Rusty Russell <rusty@linuxcare.com.au>
* This code is distributed under the terms of GNU GPL v2
*
- * $Id: ip6tables-restore.c,v 1.12 2003/05/02 15:30:11 laforge Exp $
+ * $Id: ip6tables-restore.c,v 1.13 2004/01/05 09:41:51 laforge Exp $
*/
#include <getopt.h>
@@ -182,6 +182,7 @@ int main(int argc, char *argv[])
exit(1);
}
strncpy(curtable, table, IP6T_TABLE_MAXNAMELEN);
+ curtable[IP6T_TABLE_MAXNAMELEN] = '\0';
if (handle)
ip6tc_free(&handle);