[asterisk-commits] jrose: branch 1.8 r366048 - in /branches/1.8: apps/ funcs/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 10 10:35:41 CDT 2012


Author: jrose
Date: Thu May 10 10:35:33 2012
New Revision: 366048

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=366048
Log:
Coverity Report: Fix issues for error type UNINIT in Core supported modules

(issue ASTERISK-19652)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1909/

Modified:
    branches/1.8/apps/app_chanspy.c
    branches/1.8/apps/app_disa.c
    branches/1.8/apps/app_page.c
    branches/1.8/funcs/func_cdr.c
    branches/1.8/main/features.c

Modified: branches/1.8/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_chanspy.c?view=diff&rev=366048&r1=366047&r2=366048
==============================================================================
--- branches/1.8/apps/app_chanspy.c (original)
+++ branches/1.8/apps/app_chanspy.c Thu May 10 10:35:33 2012
@@ -1250,6 +1250,7 @@
 		}
 
 	} else {
+		/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
 		ast_clear_flag(&flags, AST_FLAGS_ALL);
 	}
 
@@ -1294,6 +1295,7 @@
 	int res;
 	char *mygroup = NULL;
 
+	/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
 	ast_clear_flag(&flags, AST_FLAGS_ALL);
 
 	if (!ast_strlen_zero(data)) {

Modified: branches/1.8/apps/app_disa.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_disa.c?view=diff&rev=366048&r1=366047&r2=366048
==============================================================================
--- branches/1.8/apps/app_disa.c (original)
+++ branches/1.8/apps/app_disa.c Thu May 10 10:35:33 2012
@@ -181,8 +181,13 @@
 		args.context = "disa";
 	if (ast_strlen_zero(args.mailbox))
 		args.mailbox = "";
-	if (!ast_strlen_zero(args.options))
+	if (!ast_strlen_zero(args.options)) {
 		ast_app_parse_options(app_opts, &flags, NULL, args.options);
+	} else {
+		/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
+		ast_clear_flag(&flags, AST_FLAGS_ALL);
+	}
+
 
 	ast_debug(1, "Mailbox: %s\n",args.mailbox);
 

Modified: branches/1.8/apps/app_page.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_page.c?view=diff&rev=366048&r1=366047&r2=366048
==============================================================================
--- branches/1.8/apps/app_page.c (original)
+++ branches/1.8/apps/app_page.c Thu May 10 10:35:33 2012
@@ -177,6 +177,11 @@
 
 	if (!ast_strlen_zero(args.options)) {
 		ast_app_parse_options(page_opts, &flags, opts, args.options);
+	} else {
+		/* opts must be initialized if there wasn't an options string. */
+		for (i = 0; i < OPT_ARG_ARRAY_SIZE; i++) {
+			opts[i] = NULL;
+		}
 	}
 
 	if (!ast_strlen_zero(args.timeout)) {

Modified: branches/1.8/funcs/func_cdr.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/funcs/func_cdr.c?view=diff&rev=366048&r1=366047&r2=366048
==============================================================================
--- branches/1.8/funcs/func_cdr.c (original)
+++ branches/1.8/funcs/func_cdr.c Thu May 10 10:35:33 2012
@@ -197,7 +197,7 @@
 static int cdr_read(struct ast_channel *chan, const char *cmd, char *parse,
 		    char *buf, size_t len)
 {
-	char *ret;
+	char *ret = NULL;
 	struct ast_flags flags = { 0 };
 	struct ast_cdr *cdr;
 	AST_DECLARE_APP_ARGS(args,

Modified: branches/1.8/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/features.c?view=diff&rev=366048&r1=366047&r2=366048
==============================================================================
--- branches/1.8/main/features.c (original)
+++ branches/1.8/main/features.c Thu May 10 10:35:33 2012
@@ -3345,9 +3345,11 @@
 	struct ast_flags features;
 	struct ast_call_feature feature;
 	if (sense == FEATURE_SENSE_CHAN) {
+		/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
 		ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL);
 	}
 	else {
+		/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
 		ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL);
 	}
 




More information about the asterisk-commits mailing list