diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-01-26 12:04:32 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-01-26 12:04:32 +0100 |
commit | 503c803b8d97e7997bc2a5c42eb6a2014d013528 (patch) | |
tree | c58f7f220f0d54e87dbf028a74e6cf1975ad95b4 /vdr.c | |
parent | fe7b03d6b5ecc1e3fbb2804fe179669f8f111c7a (diff) | |
download | vdr-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |