Bug #3507
Use of ${service_name} in pipe:// URLs results in crashes and/or inconsistent behavior
Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
IPTV
Target version:
-
Start date:
2016-01-19
Due date:
% Done:
0%
Estimated time:
Found in version:
4.0.8
Affected Versions:
Description
When using ${service_name} in a pipe:// URL, TVH either crashes or behaves erratically. Importantly, it won't even invoke the pipe:// executable.
History
Updated by Diego Rivera almost 9 years ago
Problem has been located in spawn.c:
diff --git a/src/spawn.c b/src/spawn.c
index bb0edea..d5cd9fa 100644
--- a/src/spawn.c
++ b/src/spawn.c@ -414,7 +414,7
@ spawn_parse_args(char ***argv, int argc, const char *cmd, const char **replace)
strcpy(a, f);
strcat(a, r1);
strcat(a, p + l);
- *argv[i+] = a;
+ (*argv)[i++] = a;
break;
}
}
The issue is an incorrect dereference of argv - assigining to *argv (incorrect) instead of (*argv) (correct). This has been tested and resolves the issue.
Updated by Diego Rivera almost 9 years ago
Problem has been located in spawn.c:
diff --git a/src/spawn.c b/src/spawn.c index bb0edea..d5cd9fa 100644 --- a/src/spawn.c +++ b/src/spawn.c @@ -414,7 +414,7 @@ spawn_parse_args(char ***argv, int argc, const char *cmd, const char **replace) strcpy(a, f); strcat(a, r[1]); strcat(a, p + l); - *argv[i++] = a; + (*argv)[i++] = a; break; } }
The issue is an incorrect dereference of argv - assigining to *argv (incorrect) instead of (*argv) (correct). This has been tested and resolves the issue.