]> 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:22 +0000 (21:53 +0100)
src/spawn.c

index 1f7e8df39115aeb43f7139d642b1460cb1e5c67d..b79f346878be6dcb11277acd1ff80b3c9a4984bb 100644 (file)
@@ -370,6 +370,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 != '\\')