[asterisk-commits] mmichelson: branch 10 r364900 - in /branches/10: ./ funcs/func_volume.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 1 18:10:20 CDT 2012


Author: mmichelson
Date: Tue May  1 18:10:16 2012
New Revision: 364900

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

Merged revisions 364899 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/funcs/func_volume.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/funcs/func_volume.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/funcs/func_volume.c?view=diff&rev=364900&r1=364899&r2=364900
==============================================================================
--- branches/10/funcs/func_volume.c (original)
+++ branches/10/funcs/func_volume.c Tue May  1 18:10:16 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 asterisk-commits mailing list