diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-05-11 11:08:38 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-05-11 11:08:38 +0200 |
commit | 2193ea32f62c4394be13e2950896f49e01e1d14f (patch) | |
tree | d6eb101c3b0e8b841b385b90f1152977c8671c86 /config.c | |
parent | 0b4069c91f5bcc29a4ca81356d12db4e71ec1f7a (diff) | |
download | vdr-2193ea32f62c4394be13e2950896f49e01e1d14f.tar.gz vdr-2193ea32f62c4394be13e2950896f49e01e1d14f.tar.bz2 |
Making sure setup strings don't contain any newline characters
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 2.21 2012/04/15 09:52:14 kls Exp $ + * $Id: config.c 2.22 2012/05/11 11:06:57 kls Exp $ */ #include "config.h" @@ -309,9 +309,9 @@ cSetupLine::cSetupLine(void) cSetupLine::cSetupLine(const char *Name, const char *Value, const char *Plugin) { - name = strdup(Name); - value = strdup(Value); - plugin = Plugin ? strdup(Plugin) : NULL; + name = strreplace(strdup(Name), '\n', 0); + value = strreplace(strdup(Value), '\n', 0); + plugin = Plugin ? strreplace(strdup(Plugin), '\n', 0) : NULL; } cSetupLine::~cSetupLine() |