summaryrefslogtreecommitdiff
path: root/funcs/func_volume.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-05-01 23:11:22 +0000
committerMark Michelson <mmichelson@digium.com>2012-05-01 23:11:22 +0000
commitb5f0647fc87a7c420e6154955fb160917fb3b197 (patch)
tree65b2771e4155559df738444baac237cb24b24b62 /funcs/func_volume.c
parent2b7e1affacbfc6cc981e3a5257e9c0c32548f971 (diff)
Fix Coverity-reported ARRAY_VS_SINGLETON error.
As it turned out, this wasn't a huge deal. We were calling ast_app_parse_options() for a set of options of which none took arguments. The proper thing to do for this case is to pass NULL for the "args" parameter here. We were instead passing a seemingly-randomly chosen char * from the function. While this would never get written to, you can rest assured things would have gotten bad had new options (which took arguments) been added to func_volume. (closes issue ASTERISK-19656) ........ Merged revisions 364899 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 364900 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_volume.c')
-rw-r--r--funcs/func_volume.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_volume.c b/funcs/func_volume.c
index 806564bee..39b5a8a08 100644
--- a/funcs/func_volume.c
+++ b/funcs/func_volume.c
@@ -206,7 +206,7 @@ static int volume_write(struct ast_channel *chan, const char *cmd, char *data, c
if (!ast_strlen_zero(args.options)) {
struct ast_flags flags = { 0 };
- ast_app_parse_options(volume_opts, &flags, &data, args.options);
+ ast_app_parse_options(volume_opts, &flags, NULL, args.options);
vi->flags = flags.flags;
} else {
vi->flags = 0;