[asterisk-commits] jrose: branch 10 r366049 - in /branches/10: ./ apps/ funcs/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 10 10:43:12 CDT 2012
Author: jrose
Date: Thu May 10 10:43:06 2012
New Revision: 366049
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=366049
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/
........
Merged revisions 366048 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/10/ (props changed)
branches/10/apps/app_chanspy.c
branches/10/apps/app_disa.c
branches/10/apps/app_page.c
branches/10/funcs/func_cdr.c
branches/10/main/features.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_chanspy.c?view=diff&rev=366049&r1=366048&r2=366049
==============================================================================
--- branches/10/apps/app_chanspy.c (original)
+++ branches/10/apps/app_chanspy.c Thu May 10 10:43:06 2012
@@ -1255,6 +1255,7 @@
}
} else {
+ /* Coverity - This uninit_use should be ignored since this macro initializes the flags */
ast_clear_flag(&flags, AST_FLAGS_ALL);
}
@@ -1299,6 +1300,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);
ast_format_clear(&oldwf);
if (!ast_strlen_zero(data)) {
Modified: branches/10/apps/app_disa.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_disa.c?view=diff&rev=366049&r1=366048&r2=366049
==============================================================================
--- branches/10/apps/app_disa.c (original)
+++ branches/10/apps/app_disa.c Thu May 10 10:43:06 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/10/apps/app_page.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_page.c?view=diff&rev=366049&r1=366048&r2=366049
==============================================================================
--- branches/10/apps/app_page.c (original)
+++ branches/10/apps/app_page.c Thu May 10 10:43:06 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/10/funcs/func_cdr.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/funcs/func_cdr.c?view=diff&rev=366049&r1=366048&r2=366049
==============================================================================
--- branches/10/funcs/func_cdr.c (original)
+++ branches/10/funcs/func_cdr.c Thu May 10 10:43:06 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/10/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/features.c?view=diff&rev=366049&r1=366048&r2=366049
==============================================================================
--- branches/10/main/features.c (original)
+++ branches/10/main/features.c Thu May 10 10:43:06 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