提交 4f4fb9e9 authored 作者: Chris Rienzo's avatar Chris Rienzo

CID: 1211951 mod_rayo - fix unlikely dereference of null pointer

上级 84eb4a04
/* /*
* mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2013, Grasshopper * Copyright (C) 2013-2014, Grasshopper
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
...@@ -1242,6 +1242,10 @@ static int is_match_end(pcre *compiled_regex, const char *input) ...@@ -1242,6 +1242,10 @@ static int is_match_end(pcre *compiled_regex, const char *input)
const char *search = strchr(search_set, input[input_size - 1]); /* start with last digit in input */ const char *search = strchr(search_set, input[input_size - 1]); /* start with last digit in input */
int i = 0; int i = 0;
if (!search) {
return 0;
}
/* For each digit in search_set, check if input + search_set digit is a potential match. /* For each digit in search_set, check if input + search_set digit is a potential match.
If so, then this is not a match end. If so, then this is not a match end.
*/ */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论