[netfilter-cvslog] r7305 - trunk/iptables

kaber at trash.net kaber at trash.net
Tue Jan 29 14:46:01 CET 2008


Author: kaber at trash.net
Date: 2008-01-29 14:46:01 +0100 (Tue, 29 Jan 2008)
New Revision: 7305

Modified:
   trunk/iptables/ip6tables-restore.c
   trunk/iptables/iptables-restore.c
Log:
[PATCH]: allow empty strings in argument parser

Max Kellermann <max at duempel.org>


Modified: trunk/iptables/ip6tables-restore.c
===================================================================
--- trunk/iptables/ip6tables-restore.c	2008-01-29 13:45:29 UTC (rev 7304)
+++ trunk/iptables/ip6tables-restore.c	2008-01-29 13:46:01 UTC (rev 7305)
@@ -366,14 +366,12 @@
 			for (curchar = parsestart; *curchar; curchar++) {
 				char param_buffer[1024];
 
-				if (escaped) {
-					param_buffer[param_len++] = *curchar;
-					escaped = 0;
-					continue;
-				}
-
 				if (quote_open) {
-					if (*curchar == '\\') {
+					if (escaped) {
+						param_buffer[param_len++] = *curchar;
+						escaped = 0;
+						continue;
+					} else if (*curchar == '\\') {
 						escaped = 1;
 						continue;
 					} else if (*curchar == '"') {

Modified: trunk/iptables/iptables-restore.c
===================================================================
--- trunk/iptables/iptables-restore.c	2008-01-29 13:45:29 UTC (rev 7304)
+++ trunk/iptables/iptables-restore.c	2008-01-29 13:46:01 UTC (rev 7305)
@@ -373,14 +373,12 @@
 			for (curchar = parsestart; *curchar; curchar++) {
 				char param_buffer[1024];
 
-				if (escaped) {
-					param_buffer[param_len++] = *curchar;
-					escaped = 0;
-					continue;
-				}
-
 				if (quote_open) {
-					if (*curchar == '\\') {
+					if (escaped) {
+						param_buffer[param_len++] = *curchar;
+						escaped = 0;
+						continue;
+					} else if (*curchar == '\\') {
 						escaped = 1;
 						continue;
 					} else if (*curchar == '"') {




More information about the netfilter-cvslog mailing list