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:
Michael Jerris 2007-12-11 10:47:46 +00:00
parent 4a059f764a
commit f5059ad6ac
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}