diff options
author | David Cantrell <dcantrell@redhat.com> | 2007-03-08 23:19:07 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2007-03-08 23:19:07 +0000 |
commit | 11f323b3f46e0f075471448068d670ea7de8c8fa (patch) | |
tree | fb63ac68fa97a8cdbc16cac6efbae48a85729051 | |
parent | 3cc724e575f6499e6ff827e164b7d2fdc2af3968 (diff) | |
download | anaconda-11f323b3f46e0f075471448068d670ea7de8c8fa.tar.gz anaconda-11f323b3f46e0f075471448068d670ea7de8c8fa.tar.xz anaconda-11f323b3f46e0f075471448068d670ea7de8c8fa.zip |
* isys/str.c (strcount): If tmp is NULL, return 0 (#231290).
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | isys/str.c | 3 |
2 files changed, 5 insertions, 0 deletions
@@ -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 <clumens@redhat.com> * 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++; |