From: harald@redhat.com Date: Tue, 14 Sep 2004 13:50:38 +0000 (-0700) Subject: [PATCH] udev parse bug X-Git-Tag: 032~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a75e2c14f9bc098966f39f26358e6de4dc167192;p=elogind.git [PATCH] udev parse bug There is a bug parsing PROGRAMs after apostrophes. Try PROGRAM="/bin/echo 'test test". --- diff --git a/namedev.c b/namedev.c index e86f88f43..c8217024c 100644 --- a/namedev.c +++ b/namedev.c @@ -433,9 +433,9 @@ static int execute_program(char *path, char *value, int len) /* don't separate if in apostrophes */ pos++; argv[i] = strsep(&pos, "\'"); - while (pos[0] == ' ') + while (pos && pos[0] == ' ') pos++; - } else { + } else { argv[i] = strsep(&pos, " "); } dbg("arg[%i] '%s'", i, argv[i]);