diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-10-22 12:20:12 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-22 12:20:12 +0200 |
commit | b2fe9deb4f1ce025f8a77418635a9891d6e8b958 (patch) | |
tree | 81f49c948ac6db3b9dc44a466679bcb076818a38 /src/basic | |
parent | 2dcc3c69a10f76e0ee9185c863d23ee62d481919 (diff) | |
parent | 9e44f56b4ecfa47e27380165b834bd71aa403b78 (diff) |
Merge pull request #1642 from evverx/allow-unbalanced-double-quote-in-relax-mode
util: allow unbalanced double quote in EXTRACT_QUOTES|EXTRACT_RELAX mode
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/basic/util.c b/src/basic/util.c index 3e90456dd3..3989b415fa 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -5913,9 +5913,11 @@ int extract_first_word(const char **p, char **ret, const char *separators, Extra break; case DOUBLE_QUOTE: - if (c == 0) + if (c == 0) { + if (flags & EXTRACT_RELAX) + goto finish_force_terminate; return -EINVAL; - else if (c == '\"') + } else if (c == '\"') state = VALUE; else if (c == '\\') state = DOUBLE_QUOTE_ESCAPE; |