mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +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 ........ Merged revisions 413251 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413258 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -691,6 +691,10 @@ static int store_odbc(const char *database, const char *table, const struct ast_
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ast_string_field_init(&cps, 256)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
obj = ast_odbc_request_obj2(database, connected_flag);
|
||||
if (!obj) {
|
||||
return -1;
|
||||
@@ -756,6 +760,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