summaryrefslogtreecommitdiff
path: root/menuitems.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-04-14 10:00:44 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-04-14 10:00:44 +0200
commita45c1c9a28654a216db8b9b57d897c4010ce6b13 (patch)
treefbf80044e21a08271bcb96df9162099f4b456d4f /menuitems.c
parentcb50726989e1e8a12762703cb1c9072fb0171bbd (diff)
downloadvdr-a45c1c9a28654a216db8b9b57d897c4010ce6b13.tar.gz
vdr-a45c1c9a28654a216db8b9b57d897c4010ce6b13.tar.bz2
Added NULL checks to some strdup() calls in menuitems.c
Diffstat (limited to 'menuitems.c')
-rw-r--r--menuitems.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/menuitems.c b/menuitems.c
index 12d56963..56e5a4b0 100644
--- a/menuitems.c
+++ b/menuitems.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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"
@@ -23,7 +23,7 @@ const char *FileNameChars = " abcdefghijklmnopqrstuvwxyz0123456789-.#~,/_@";
cMenuEditItem::cMenuEditItem(const char *Name)
{
- name = strdup(Name);
+ name = strdup(Name ? Name : "???");
value = NULL;
}
@@ -205,7 +205,7 @@ cMenuEditChrItem::cMenuEditChrItem(const char *Name, char *Value, const char *Al
:cMenuEditItem(Name)
{
value = Value;
- allowed = strdup(Allowed);
+ allowed = strdup(Allowed ? Allowed : "");
current = strchr(allowed, *Value);
if (!current)
current = allowed;
@@ -254,7 +254,7 @@ cMenuEditStrItem::cMenuEditStrItem(const char *Name, char *Value, int Length, co
orgValue = NULL;
value = Value;
length = Length;
- allowed = strdup(Allowed);
+ allowed = strdup(Allowed ? Allowed : "");
pos = -1;
insert = uppercase = false;
newchar = true;