summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2007-03-08 23:19:07 +0000
committerDavid Cantrell <dcantrell@redhat.com>2007-03-08 23:19:07 +0000
commit11f323b3f46e0f075471448068d670ea7de8c8fa (patch)
treefb63ac68fa97a8cdbc16cac6efbae48a85729051 /isys
parent3cc724e575f6499e6ff827e164b7d2fdc2af3968 (diff)
downloadanaconda-11f323b3f46e0f075471448068d670ea7de8c8fa.tar.gz
anaconda-11f323b3f46e0f075471448068d670ea7de8c8fa.tar.xz
anaconda-11f323b3f46e0f075471448068d670ea7de8c8fa.zip
* isys/str.c (strcount): If tmp is NULL, return 0 (#231290).
Diffstat (limited to 'isys')
-rw-r--r--isys/str.c3
1 files changed, 3 insertions, 0 deletions
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++;