summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iptables/ip6tables-restore.c2
-rw-r--r--iptables/iptables-restore.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/iptables/ip6tables-restore.c b/iptables/ip6tables-restore.c
index 92bdc302..3894d68d 100644
--- a/iptables/ip6tables-restore.c
+++ b/iptables/ip6tables-restore.c
@@ -98,7 +98,7 @@ static int add_argv(char *what) {
DEBUGP("add_argv: %s\n", what);
if (what && newargc + 1 < ARRAY_SIZE(newargv)) {
newargv[newargc] = strdup(what);
- newargc++;
+ newargv[++newargc] = NULL;
return 1;
} else {
xtables_error(PARAMETER_PROBLEM,
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
index 6b1c7929..034f9606 100644
--- a/iptables/iptables-restore.c
+++ b/iptables/iptables-restore.c
@@ -97,7 +97,7 @@ static int add_argv(char *what) {
DEBUGP("add_argv: %s\n", what);
if (what && newargc + 1 < ARRAY_SIZE(newargv)) {
newargv[newargc] = strdup(what);
- newargc++;
+ newargv[++newargc] = NULL;
return 1;
} else {
xtables_error(PARAMETER_PROBLEM,