[svn-commits] mmichelson: branch 1.8 r364899 - /branches/1.8/funcs/func_volume.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue May 1 18:08:24 CDT 2012


Author: mmichelson
Date: Tue May  1 18:08:20 2012
New Revision: 364899

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=364899
Log:
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)


Modified:
    branches/1.8/funcs/func_volume.c

Modified: branches/1.8/funcs/func_volume.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/funcs/func_volume.c?view=diff&rev=364899&r1=364898&r2=364899
==============================================================================
--- branches/1.8/funcs/func_volume.c (original)
+++ branches/1.8/funcs/func_volume.c Tue May  1 18:08:20 2012
@@ -206,7 +206,7 @@
 	
 	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; 




More information about the svn-commits mailing list