From 11f323b3f46e0f075471448068d670ea7de8c8fa Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Thu, 8 Mar 2007 23:19:07 +0000 Subject: * isys/str.c (strcount): If tmp is NULL, return 0 (#231290). --- ChangeLog | 2 ++ isys/str.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index c96b595b7..0d55fceaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,8 @@ argument, pull the MAC address from it and replace hyphens with colons so that the MAC address is usable in loader (#209284). + * isys/str.c (strcount): If tmp is NULL, return 0 (#231290). + 2007-03-08 Chris Lumens * kickstart.py (Raid): Subclass from F7_Raid instead. diff --git a/isys/str.c b/isys/str.c index b3a6fdd9a..ce2e750cb 100644 --- a/isys/str.c +++ b/isys/str.c @@ -103,6 +103,9 @@ int strcount(char *str, int ch) { int retval = 0; char *tmp = str; + if (tmp == NULL) + return retval; + do { if ((tmp = strindex(tmp, ch)) != NULL) { tmp++; -- cgit