[asterisk-commits] russell: branch 1.8 r359534 - /branches/1.8/channels/chan_gtalk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 14 19:25:24 CDT 2012


Author: russell
Date: Wed Mar 14 19:25:20 2012
New Revision: 359534

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=359534
Log:
chan_gtalk: Fix use of uninitialized vars in config handling.

Fix potential use of context, parkinglot, and prefs before they are
initialized.

Modified:
    branches/1.8/channels/chan_gtalk.c

Modified: branches/1.8/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_gtalk.c?view=diff&rev=359534&r1=359533&r2=359534
==============================================================================
--- branches/1.8/channels/chan_gtalk.c (original)
+++ branches/1.8/channels/chan_gtalk.c Wed Mar 14 19:25:20 2012
@@ -2077,12 +2077,12 @@
 {
 	char *cat = NULL;
 	struct ast_config *cfg = NULL;
-	char context[AST_MAX_CONTEXT];
-	char parkinglot[AST_MAX_CONTEXT];
+	char context[AST_MAX_CONTEXT] = "";
+	char parkinglot[AST_MAX_CONTEXT] = "";
 	int allowguest = 1;
 	struct ast_variable *var;
 	struct gtalk *member;
-	struct ast_codec_pref prefs;
+	struct ast_codec_pref prefs = { "", };
 	struct aji_client_container *clients;
 	struct gtalk_candidate *global_candidates = NULL;
 	struct hostent *hp;




More information about the asterisk-commits mailing list