projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4c7a1c
)
Don't attempt to run a regcomp if we haven't even parsed arguments correctly
author
Tilghman Lesher
<tilghman@meg.abyt.es>
Mon, 3 Jul 2006 06:32:35 +0000
(06:32 +0000)
committer
Tilghman Lesher
<tilghman@meg.abyt.es>
Mon, 3 Jul 2006 06:32:35 +0000
(06:32 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36777
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
funcs/func_strings.c
patch
|
blob
|
history
diff --git
a/funcs/func_strings.c
b/funcs/func_strings.c
index
97132a5
..
fcecb77
100644
(file)
--- a/
funcs/func_strings.c
+++ b/
funcs/func_strings.c
@@
-119,6
+119,11
@@
static int regex(struct ast_channel *chan, char *cmd, char *parse, char *buf,
AST_NONSTANDARD_APP_ARGS(args, parse, '"');
+ if (args.argc != 3) {
+ ast_log(LOG_ERROR, "Unexpected arguments: should have been in the form '\"<regex>\" <string>'\n");
+ return -1;
+ }
+
ast_log(LOG_DEBUG, "FUNCTION REGEX (%s)(%s)\n", args.reg, args.str);
if ((errcode = regcomp(®exbuf, args.reg, REG_EXTENDED | REG_NOSUB))) {