Fix strcasestr SIGSEGV in the case of only upper case strchr returning NULL
(cherry picked from commit c5d73e37bbc0c9fa8fd1dd874ac782b655068576)
This commit is contained in:
1 parent
dc23895875
commit
05246f36a6
1 file changed
+1
-1
+1
-1
@@ -75,7 +75,7 @@ strcasestr (const char *s, const char *q)
|
||||
if (!( (intptr_t)up|(intptr_t)lp ))
|
||||
return 0;
|
||||
|
||||
if (!lp || up < lp)
|
||||
if (!lp || ( up && up < lp ))
|
||||
{
|
||||
ppa = &up;
|
||||
ppb = &lp;
|
||||
|
||||
Reference in new issue
Block a user