Message ID | 20180307232620.15746-3-mwilck@suse.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show |
diff --git a/libmultipath/parser.c b/libmultipath/parser.c index 5caa2019a1a4..3d9656f47945 100644 --- a/libmultipath/parser.c +++ b/libmultipath/parser.c @@ -262,7 +262,8 @@ alloc_strvec(char *string) } vector_set_slot(strvec, token); - while ((isspace((int) *cp) || !isascii((int) *cp)) + while ((!in_string && + (isspace((int) *cp) || !isascii((int) *cp))) && *cp != '\0') cp++; if (*cp == '\0' || *cp == '!' || *cp == '#')
Between double quotes, the parser currently strips leading (but not trailing) whitespace. That's inconsistent and unexpected. Fix it. Signed-off-by: Martin Wilck <mwilck@suse.com> --- libmultipath/parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)