[asterisk-commits] mmichelson: trunk r413263 - in /trunk: ./ res/res_config_odbc.c

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


Author: mmichelson
Date: Fri May  2 15:28:23 2014
New Revision: 413263

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

Merged revisions 413251 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413258 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_config_odbc.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/res_config_odbc.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_config_odbc.c?view=diff&rev=413263&r1=413262&r2=413263
==============================================================================
--- trunk/res/res_config_odbc.c (original)
+++ trunk/res/res_config_odbc.c Fri May  2 15:28:23 2014
@@ -691,6 +691,10 @@
 		return -1;
 	}
 
+	if (ast_string_field_init(&cps, 256)) {
+		return -1;
+	}
+
 	obj = ast_odbc_request_obj2(database, connected_flag);
 	if (!obj) {
 		return -1;
@@ -753,6 +757,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