Project

General

Profile

Bug #3507

Use of ${service_name} in pipe:// URLs results in crashes and/or inconsistent behavior

Added by Diego Rivera almost 9 years ago. Updated almost 9 years ago.

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

#1

Updated by Jaroslav Kysela almost 9 years ago

Run valgrind on top and show the crashes.

#2

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.

#3

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.

#4

Updated by Diego Rivera almost 9 years ago

Pull request #794 submitted with the fix.

#5

Updated by Jaroslav Kysela almost 9 years ago

  • Status changed from New to Fixed

Applied. Thanks.

Also available in: Atom PDF