mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Merged revisions 44476 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r44476 | kpfleming | 2006-10-05 11:10:01 -0500 (Thu, 05 Oct 2006) | 3 lines don't segfault when an argument without a close parenthesis is found stop parsing as soon as that situation occurs ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1316,14 +1316,14 @@ int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags
|
|||||||
if (*s == '(') {
|
if (*s == '(') {
|
||||||
/* Has argument */
|
/* Has argument */
|
||||||
arg = ++s;
|
arg = ++s;
|
||||||
s = strchr(s, ')');
|
if ((s = strchr(s, ')'))) {
|
||||||
if (*s) {
|
|
||||||
if (argloc)
|
if (argloc)
|
||||||
args[argloc - 1] = arg;
|
args[argloc - 1] = arg;
|
||||||
*s++ = '\0';
|
*s++ = '\0';
|
||||||
} else {
|
} else {
|
||||||
ast_log(LOG_WARNING, "Missing closing parenthesis for argument '%c' in string '%s'\n", curarg, arg);
|
ast_log(LOG_WARNING, "Missing closing parenthesis for argument '%c' in string '%s'\n", curarg, arg);
|
||||||
res = -1;
|
res = -1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else if (argloc) {
|
} else if (argloc) {
|
||||||
args[argloc - 1] = NULL;
|
args[argloc - 1] = NULL;
|
||||||
|
Reference in New Issue
Block a user