projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bmstrcasestr() now returns NULL if either of its supplied
[citadel.git]
/
libcitadel
/
lib
/
tools.c
diff --git
a/libcitadel/lib/tools.c
b/libcitadel/lib/tools.c
index 32c96e035f569b54f21c05d230144676deee79c9..dd630420fa4b79b57ded590ddcab02414e5192dd 100644
(file)
--- a/
libcitadel/lib/tools.c
+++ b/
libcitadel/lib/tools.c
@@
-772,6
+772,9
@@
char *bmstrcasestr(char *text, char *pattern) {
size_t textlen;
size_t patlen;
+ if (!text) return(NULL);
+ if (!pattern) return(NULL);
+
textlen = strlen (text);
patlen = strlen (pattern);