summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-07-31 13:23:31 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-07-31 13:23:31 +0200
commit404124eca463c5ba8ce76b1b3ca4e9454eeee7d4 (patch)
treee60922c2e0500027f388fc267707010dd6ae4a05
parentba5bae0d1c643fb824d355704471b156bd184469 (diff)
downloadvdr-404124eca463c5ba8ce76b1b3ca4e9454eeee7d4.tar.gz
vdr-404124eca463c5ba8ce76b1b3ca4e9454eeee7d4.tar.bz2
The isnumber() function now checks the given pointer for NULL
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY4
-rw-r--r--tools.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 47782f81..871f6bf9 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2727,3 +2727,6 @@ Johan Andersson <jna@jna.pp.se>
Dave Pickles <dave@pickles.me.uk>
for adding support for "content identifier descriptor" and "default authority
descriptor" to 'libsi'
+
+Holger Dengler <holger.dengler@gmx.de>
+ for making the isnumber() function check the given pointer for NULL
diff --git a/HISTORY b/HISTORY
index 46a61bb8..f5780e8e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6650,6 +6650,8 @@ Video Disk Recorder Revision History
- Added support for "content identifier descriptor" and "default authority descriptor"
to 'libsi' (thanks to Dave Pickles).
-2011-06-21: Version 1.7.20
+2011-07-31: Version 1.7.20
- Added some missing 'const' to tChannelID (reported by Sundararaj Reel).
+- The isnumber() function now checks the given pointer for NULL (thanks to Holger
+ Dengler).
diff --git a/tools.c b/tools.c
index 6a98bf69..e0b11633 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 2.14 2011/04/29 14:51:14 kls Exp $
+ * $Id: tools.c 2.15 2011/07/31 13:19:28 kls Exp $
*/
#include "tools.h"
@@ -261,7 +261,7 @@ int numdigits(int n)
bool isnumber(const char *s)
{
- if (!*s)
+ if (!s || !*s)
return false;
do {
if (!isdigit(*s))