提交 f5059ad6 authored 作者: Michael Jerris's avatar Michael Jerris

check to avoid potential seg

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6633 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 4a059f76
...@@ -216,6 +216,10 @@ static inline switch_bool_t switch_strstr(char *s, char *q) ...@@ -216,6 +216,10 @@ static inline switch_bool_t switch_strstr(char *s, char *q)
char *p, *S = NULL, *Q = NULL; char *p, *S = NULL, *Q = NULL;
switch_bool_t tf = SWITCH_FALSE; switch_bool_t tf = SWITCH_FALSE;
if (!s || !q) {
return SWITCH_FALSE;
}
if (strstr(s, q)) { if (strstr(s, q)) {
return SWITCH_TRUE; return SWITCH_TRUE;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论