summaryrefslogtreecommitdiffstats
path: root/ip6tables-restore.c
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net>2008-01-29 13:46:01 +0000
committer/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net>2008-01-29 13:46:01 +0000
commit4e7cb355f8e82e7d4d7c6bf6dd36a6d860a3e70f (patch)
tree037a059fd364e4bf55f79d1d383aab350cf58776 /ip6tables-restore.c
parentbec92374981c8dbf2b873d673e96e2da59870fab (diff)
[PATCH]: allow empty strings in argument parser
Max Kellermann <max@duempel.org>
Diffstat (limited to 'ip6tables-restore.c')
-rw-r--r--ip6tables-restore.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/ip6tables-restore.c b/ip6tables-restore.c
index 2d2f8b0..570bd51 100644
--- a/ip6tables-restore.c
+++ b/ip6tables-restore.c
@@ -366,14 +366,12 @@ int main(int argc, char *argv[])
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 == '"') {