[asterisk-commits] mmichelson: branch 11 r413251 - in /branches/11: ./ res/res_config_odbc.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 2 15:25:04 CDT 2014


Author: mmichelson
Date: Fri May  2 15:25:00 2014
New Revision: 413251

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=413251
Log:
Prevent crashes in res_config_odbc due to uninitialized string fields.

Patches:
    odbc-crash.patch by John Hardin (License #6512)
........

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

Modified:
    branches/11/   (props changed)
    branches/11/res/res_config_odbc.c

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

Modified: branches/11/res/res_config_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_config_odbc.c?view=diff&rev=413251&r1=413250&r2=413251
==============================================================================
--- branches/11/res/res_config_odbc.c (original)
+++ branches/11/res/res_config_odbc.c Fri May  2 15:25:00 2014
@@ -744,6 +744,10 @@
 		return -1;
 	}
 
+	if (ast_string_field_init(&cps, 256)) {
+		return -1;
+	}
+
 	obj = ast_odbc_request_obj2(database, connected_flag);
 	if (!obj) {
 		return -1;
@@ -821,6 +825,10 @@
 	struct ast_flags connected_flag = { RES_ODBC_CONNECTED };
 
 	if (!table) {
+		return -1;
+	}
+
+	if (ast_string_field_init(&cps, 256)) {
 		return -1;
 	}
 




More information about the asterisk-commits mailing list