Making sure setup strings don't contain any newline characters

This commit is contained in:
Klaus Schmidinger 2012-05-11 11:08:38 +02:00
parent 0b4069c91f
commit 2193ea32f6
3 changed files with 8 additions and 5 deletions

View File

@ -1784,6 +1784,7 @@ Joachim Wilke <vdr@joachim-wilke.de>
for modifying cCharSetConv so that it can be used to convert from "whatever VDR uses" for modifying cCharSetConv so that it can be used to convert from "whatever VDR uses"
to a given code to a given code
for adding some missing 'const' to cDevice for adding some missing 'const' to cDevice
for making sure setup strings don't contain any newline characters
Sascha Klek <sklek@gmx.de> Sascha Klek <sklek@gmx.de>
for reporting a problem with the '0' key in the "Day" item of the "Timers" menu for reporting a problem with the '0' key in the "Day" item of the "Timers" menu

View File

@ -7052,7 +7052,7 @@ Video Disk Recorder Revision History
- Fixed handling IDLEPRIORITY in cDvbDevice::ProvidesChannel() (thanks to Frank - Fixed handling IDLEPRIORITY in cDvbDevice::ProvidesChannel() (thanks to Frank
Schmirler). Schmirler).
2012-05-08: Version 1.7.28 2012-05-11: Version 1.7.28
- Fixed cPixmapMemory::DrawEllipse() for quadrants -1 and -4. - Fixed cPixmapMemory::DrawEllipse() for quadrants -1 and -4.
- Fixed getting the maximum short channel name length in case there are no short names - Fixed getting the maximum short channel name length in case there are no short names
@ -7102,3 +7102,5 @@ Video Disk Recorder Revision History
- Removed the "bondedMasterFailed" mechanism from cDvbTuner, because it caused - Removed the "bondedMasterFailed" mechanism from cDvbTuner, because it caused
problems with the EPG scan in case a transponder is not receivable in a setup with problems with the EPG scan in case a transponder is not receivable in a setup with
bonded devices (reported by Michael Schneider). bonded devices (reported by Michael Schneider).
- Making sure setup strings don't contain any newline characters (thanks to Joachim
Wilke).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "config.h"
@ -309,9 +309,9 @@ cSetupLine::cSetupLine(void)
cSetupLine::cSetupLine(const char *Name, const char *Value, const char *Plugin) cSetupLine::cSetupLine(const char *Name, const char *Value, const char *Plugin)
{ {
name = strdup(Name); name = strreplace(strdup(Name), '\n', 0);
value = strdup(Value); value = strreplace(strdup(Value), '\n', 0);
plugin = Plugin ? strdup(Plugin) : NULL; plugin = Plugin ? strreplace(strdup(Plugin), '\n', 0) : NULL;
} }
cSetupLine::~cSetupLine() cSetupLine::~cSetupLine()