]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
fix spawn_parse_args() - endless loop - multiple spaces
authorJaroslav Kysela <perex@perex.cz>
Wed, 28 Oct 2015 20:53:22 +0000 (21:53 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 28 Oct 2015 20:53:31 +0000 (21:53 +0100)
src/spawn.c

index f311061932f15778156712090d39dc727db6522c..a12004db3a7f769a3859904d8049c08dc8afb6bd 100644 (file)
@@ -357,6 +357,8 @@ spawn_parse_args(char ***argv, int argc, const char *cmd, const char **replace)
   *argv = calloc(argc, sizeof(char *));
 
   while (*s && i < argc - 1) {
+    while (*s == ' ')
+      s++;
     f = s;
     while (*s && *s != ' ') {
       while (*s && *s != ' ' && *s != '\\')