Fix strcasestr SIGSEGV in the case of only upper case strchr returning NULL
This commit is contained in:
parent
d1d1098f7c
commit
c5d73e37bb
|
@ -75,7 +75,7 @@ strcasestr (const char *s, const char *q)
|
||||||
if (!( (intptr_t)up|(intptr_t)lp ))
|
if (!( (intptr_t)up|(intptr_t)lp ))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!lp || up < lp)
|
if (!lp || ( up && up < lp ))
|
||||||
{
|
{
|
||||||
ppa = &up;
|
ppa = &up;
|
||||||
ppb = &lp;
|
ppb = &lp;
|
||||||
|
|
Loading…
Reference in a new issue