[PATCH] udev parse bug

There is a bug parsing PROGRAMs after apostrophes. Try PROGRAM="/bin/echo 'test test".
This commit is contained in:
harald@redhat.com 2004-09-14 06:50:38 -07:00 committed by Greg KH
parent 6d74f9967b
commit a75e2c14f9

View file

@ -433,7 +433,7 @@ 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 {
argv[i] = strsep(&pos, " ");