mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added NULL checks to some strdup() calls in menuitems.c
This commit is contained in:
parent
cb50726989
commit
a45c1c9a28
@ -1472,6 +1472,7 @@ Darren Salt <linux@youmustbejoking.demon.co.uk>
|
|||||||
it won't follow symbolic links, and to canonicalize the file name
|
it won't follow symbolic links, and to canonicalize the file name
|
||||||
for making all font and image data 'const'
|
for making all font and image data 'const'
|
||||||
for fixing format string handling
|
for fixing format string handling
|
||||||
|
for suggesting to add NULL checks to some strdup() calls in menuitems.c
|
||||||
|
|
||||||
Sean Carlos <seanc@libero.it>
|
Sean Carlos <seanc@libero.it>
|
||||||
for translating OSD texts to the Italian language
|
for translating OSD texts to the Italian language
|
||||||
|
2
HISTORY
2
HISTORY
@ -4505,3 +4505,5 @@ Video Disk Recorder Revision History
|
|||||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||||
- Fixed a crash when setting the time transponder in the Setup menu, caused by the
|
- Fixed a crash when setting the time transponder in the Setup menu, caused by the
|
||||||
new 'noneString' in cMenuEditChanItem (reported by Thomas Günther).
|
new 'noneString' in cMenuEditChanItem (reported by Thomas Günther).
|
||||||
|
- Added NULL checks to some strdup() calls in menuitems.c (suggested by Darren
|
||||||
|
Salt).
|
||||||
|
@ -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: menuitems.c 1.37 2006/04/14 09:53:46 kls Exp $
|
* $Id: menuitems.c 1.38 2006/04/14 09:59:16 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menuitems.h"
|
#include "menuitems.h"
|
||||||
@ -23,7 +23,7 @@ const char *FileNameChars = " abcdefghijklmnopqrstuvwxyz0123456789-.#~,/_@";
|
|||||||
|
|
||||||
cMenuEditItem::cMenuEditItem(const char *Name)
|
cMenuEditItem::cMenuEditItem(const char *Name)
|
||||||
{
|
{
|
||||||
name = strdup(Name);
|
name = strdup(Name ? Name : "???");
|
||||||
value = NULL;
|
value = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ cMenuEditChrItem::cMenuEditChrItem(const char *Name, char *Value, const char *Al
|
|||||||
:cMenuEditItem(Name)
|
:cMenuEditItem(Name)
|
||||||
{
|
{
|
||||||
value = Value;
|
value = Value;
|
||||||
allowed = strdup(Allowed);
|
allowed = strdup(Allowed ? Allowed : "");
|
||||||
current = strchr(allowed, *Value);
|
current = strchr(allowed, *Value);
|
||||||
if (!current)
|
if (!current)
|
||||||
current = allowed;
|
current = allowed;
|
||||||
@ -254,7 +254,7 @@ cMenuEditStrItem::cMenuEditStrItem(const char *Name, char *Value, int Length, co
|
|||||||
orgValue = NULL;
|
orgValue = NULL;
|
||||||
value = Value;
|
value = Value;
|
||||||
length = Length;
|
length = Length;
|
||||||
allowed = strdup(Allowed);
|
allowed = strdup(Allowed ? Allowed : "");
|
||||||
pos = -1;
|
pos = -1;
|
||||||
insert = uppercase = false;
|
insert = uppercase = false;
|
||||||
newchar = true;
|
newchar = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user