]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables-xml: fix parameter parsing (similar to 2165f38)
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 26 Jul 2013 14:38:55 +0000 (16:38 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 26 Jul 2013 14:38:55 +0000 (16:38 +0200)
Similar to (2165f38 iptables-restore: fix parameter parsing
(shows up with gcc-4.7)), make sure iptables-xml doesn't hit
the same problem.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/iptables-xml.c

index e272ef9136f8374e7f47e3844a9c00c11d572b1c..962844762fc4e9ea0421f5d1fbdf802169f0df20 100644 (file)
@@ -740,6 +740,7 @@ iptables_xml_main(int argc, char *argv[])
                        /* the parser */
                        char *param_start, *curchar;
                        int quote_open, quoted;
+                       char param_buffer[1024];
 
                        /* reset the newargv */
                        newargc = 0;
@@ -799,7 +800,6 @@ iptables_xml_main(int argc, char *argv[])
                                }
                                if (*curchar == ' '
                                    || *curchar == '\t' || *curchar == '\n') {
-                                       char param_buffer[1024];
                                        int param_len = curchar - param_start;
 
                                        if (quote_open)