summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-01-26 12:04:32 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-01-26 12:04:32 +0100
commit503c803b8d97e7997bc2a5c42eb6a2014d013528 (patch)
treec58f7f220f0d54e87dbf028a74e6cf1975ad95b4 /vdr.c
parentfe7b03d6b5ecc1e3fbb2804fe179669f8f111c7a (diff)
downloadvdr-503c803b8d97e7997bc2a5c42eb6a2014d013528.tar.gz
vdr-503c803b8d97e7997bc2a5c42eb6a2014d013528.tar.bz2
Fixed handling file names that contain single quotes or dollar signs in calls to external commands
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vdr.c b/vdr.c
index 264803a5..572e16f1 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.90 2002/01/13 16:00:47 kls Exp $
+ * $Id: vdr.c 1.91 2002/01/26 11:53:11 kls Exp $
*/
#include <getopt.h>
@@ -499,7 +499,7 @@ int main(int argc, char *argv[])
int Channel = timer ? timer->channel : 0;
const char *File = timer ? timer->file : "";
char *cmd;
- asprintf(&cmd, "%s %ld %ld %d '%s' %d", Shutdown, Next, Delta, Channel, File, UserShutdown);
+ asprintf(&cmd, "%s %ld %ld %d \"%s\" %d", Shutdown, Next, Delta, Channel, strescape(File, "\"$"), UserShutdown);
isyslog(LOG_INFO, "executing '%s'", cmd);
SystemExec(cmd);
delete cmd;