The isnumber() function now checks the given pointer for NULL

This commit is contained in:
Klaus Schmidinger 2011-07-31 13:23:31 +02:00
parent ba5bae0d1c
commit 404124eca4
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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).

View File

@ -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))