diff options
author | Karsten Desler <kdesler@soohrt.org> | 2004-01-31 15:33:55 +0000 |
---|---|---|
committer | Martin Josefsson <gandalf@wlug.westbo.se> | 2004-01-31 15:33:55 +0000 |
commit | 073df8feb0a8c4023ce40138e519ac9b341b1ca2 (patch) | |
tree | b29bb39cfef731e863db577f1ff161e4bf5d3f5f /iptables-restore.c | |
parent | 617b7dd9ef2870e85694ad5212c61fa7c5986ec9 (diff) |
Fix even more possibly not zero-terminated strings after copy (Karsten Desler)
Diffstat (limited to 'iptables-restore.c')
-rw-r--r-- | iptables-restore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/iptables-restore.c b/iptables-restore.c index 0a5627da..9ef78c78 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -4,7 +4,7 @@ * * This code is distributed under the terms of GNU GPL v2 * - * $Id: iptables-restore.c,v 1.26 2003/05/02 15:30:11 laforge Exp $ + * $Id: iptables-restore.c,v 1.27 2004/01/05 09:41:50 laforge Exp $ */ #include <getopt.h> @@ -179,6 +179,7 @@ int main(int argc, char *argv[]) exit(1); } strncpy(curtable, table, IPT_TABLE_MAXNAMELEN); + curtable[IPT_TABLE_MAXNAMELEN] = '\0'; if (handle) iptc_free(&handle); |