check to avoid potential seg
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6633 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4a059f764a
commit
f5059ad6ac
|
@ -216,6 +216,10 @@ static inline switch_bool_t switch_strstr(char *s, char *q)
|
|||
char *p, *S = NULL, *Q = NULL;
|
||||
switch_bool_t tf = SWITCH_FALSE;
|
||||
|
||||
if (!s || !q) {
|
||||
return SWITCH_FALSE;
|
||||
}
|
||||
|
||||
if (strstr(s, q)) {
|
||||
return SWITCH_TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue