From a75e2c14f9bc098966f39f26358e6de4dc167192 Mon Sep 17 00:00:00 2001 From: "harald@redhat.com" Date: Tue, 14 Sep 2004 06:50:38 -0700 Subject: [PATCH] [PATCH] udev parse bug There is a bug parsing PROGRAMs after apostrophes. Try PROGRAM="/bin/echo 'test test". --- namedev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/namedev.c b/namedev.c index e86f88f4..c8217024 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]); -- 2.39.5