mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Merge "app_voicemail: vm_authenticate accesses uninitialized memory"
This commit is contained in:
@@ -11190,7 +11190,7 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (vmu && !skipuser) {
|
if (vmu && !skipuser) {
|
||||||
memcpy(res_vmu, vmu, sizeof(struct ast_vm_user));
|
*res_vmu = *vmu;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -11352,8 +11352,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
|
|||||||
int box;
|
int box;
|
||||||
int useadsi = 0;
|
int useadsi = 0;
|
||||||
int skipuser = 0;
|
int skipuser = 0;
|
||||||
struct vm_state vms;
|
struct vm_state vms = {{0}};
|
||||||
struct ast_vm_user *vmu = NULL, vmus;
|
struct ast_vm_user *vmu = NULL, vmus = {{0}};
|
||||||
char *context = NULL;
|
char *context = NULL;
|
||||||
int silentexit = 0;
|
int silentexit = 0;
|
||||||
struct ast_flags flags = { 0 };
|
struct ast_flags flags = { 0 };
|
||||||
@@ -11366,12 +11366,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Add the vm_state to the active list and keep it active */
|
/* Add the vm_state to the active list and keep it active */
|
||||||
memset(&vms, 0, sizeof(vms));
|
|
||||||
|
|
||||||
vms.lastmsg = -1;
|
vms.lastmsg = -1;
|
||||||
|
|
||||||
memset(&vmus, 0, sizeof(vmus));
|
|
||||||
|
|
||||||
ast_test_suite_event_notify("START", "Message: vm_execmain started");
|
ast_test_suite_event_notify("START", "Message: vm_execmain started");
|
||||||
if (ast_channel_state(chan) != AST_STATE_UP) {
|
if (ast_channel_state(chan) != AST_STATE_UP) {
|
||||||
ast_debug(1, "Before ast_answer\n");
|
ast_debug(1, "Before ast_answer\n");
|
||||||
@@ -12664,7 +12660,7 @@ static struct ast_custom_function vm_info_acf = {
|
|||||||
static int vmauthenticate(struct ast_channel *chan, const char *data)
|
static int vmauthenticate(struct ast_channel *chan, const char *data)
|
||||||
{
|
{
|
||||||
char *s, *user = NULL, *context = NULL, mailbox[AST_MAX_EXTENSION] = "";
|
char *s, *user = NULL, *context = NULL, mailbox[AST_MAX_EXTENSION] = "";
|
||||||
struct ast_vm_user vmus;
|
struct ast_vm_user vmus = {{0}};
|
||||||
char *options = NULL;
|
char *options = NULL;
|
||||||
int silent = 0, skipuser = 0;
|
int silent = 0, skipuser = 0;
|
||||||
int res = -1;
|
int res = -1;
|
||||||
|
Reference in New Issue
Block a user