mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 07:18:15 +00:00
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
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -744,6 +744,10 @@ static int store_odbc(const char *database, const char *table, va_list ap)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ast_string_field_init(&cps, 256)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
obj = ast_odbc_request_obj2(database, connected_flag);
|
||||
if (!obj) {
|
||||
return -1;
|
||||
@@ -824,6 +828,10 @@ static int destroy_odbc(const char *database, const char *table, const char *key
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ast_string_field_init(&cps, 256)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
obj = ast_odbc_request_obj2(database, connected_flag);
|
||||
if (!obj) {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user