On Wed, 27.11.13 18:00, Lukas Nykryn (lnyk...@redhat.com) wrote: I merged a different patch that simply moves the earlier NUL byte check after the jumping over whitespace, so that we don't need two checks. I also added a test case for this, so that this doesn't break again.
(That sad, the whole function is moronic, since it doesn't really do any sane unescaping of quotes inside of strings... We should rewrite this one day, and maybe do it in a smart way that allocates a dynamically sized string of the current word on the stack...) > --- > src/shared/util.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/shared/util.c b/src/shared/util.c > index 3a4d196..c68ab09 100644 > --- a/src/shared/util.c > +++ b/src/shared/util.c > @@ -383,7 +383,9 @@ char *split_quoted(const char *c, size_t *l, char > **state) { > > current += strspn(current, WHITESPACE); > > - if (*current == '\'') { > + if (*current == 0) > + return NULL; > + else if (*current == '\'') { > current ++; > > for (e = current; *e; e++) { Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel