[asterisk-commits] mmichelson: branch 1.8 r413241 - /branches/1.8/res/res_config_odbc.c

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


Author: mmichelson
Date: Fri May  2 15:21:34 2014
New Revision: 413241

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

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


Modified:
    branches/1.8/res/res_config_odbc.c

Modified: branches/1.8/res/res_config_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_config_odbc.c?view=diff&rev=413241&r1=413240&r2=413241
==============================================================================
--- branches/1.8/res/res_config_odbc.c (original)
+++ branches/1.8/res/res_config_odbc.c Fri May  2 15:21:34 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