[Asterisk-code-review] app voicemail: vm authenticate access unitialized memory (asterisk[master])
Sean Bright
asteriskteam at digium.com
Mon Feb 20 06:31:22 CST 2017
Sean Bright has uploaded a new change for review. ( https://gerrit.asterisk.org/5021 )
Change subject: app_voicemail: vm_authenticate access unitialized memory
......................................................................
app_voicemail: vm_authenticate access unitialized memory
vm_authenticate doesn't always set the passed ast_vm_user argument, so
we initialize to 0 before passing it in.
ASTERISK-25893 #close
Reported by: Filip Jenicek
Change-Id: Ia3cc0128f93d352ed9add8d5c2f0f7232c2cbe4a
---
M apps/app_voicemail.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/21/5021/1
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 91e8104..9f35a85 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -11190,7 +11190,7 @@
return -1;
}
if (vmu && !skipuser) {
- memcpy(res_vmu, vmu, sizeof(struct ast_vm_user));
+ *res_vmu = *vmu;
}
return 0;
}
@@ -11353,7 +11353,7 @@
int useadsi = 0;
int skipuser = 0;
struct vm_state vms;
- struct ast_vm_user *vmu = NULL, vmus;
+ struct ast_vm_user *vmu = NULL, vmus = {0,};
char *context = NULL;
int silentexit = 0;
struct ast_flags flags = { 0 };
@@ -12664,7 +12664,7 @@
static int vmauthenticate(struct ast_channel *chan, const char *data)
{
char *s, *user = NULL, *context = NULL, mailbox[AST_MAX_EXTENSION] = "";
- struct ast_vm_user vmus;
+ struct ast_vm_user vmus = {0,};
char *options = NULL;
int silent = 0, skipuser = 0;
int res = -1;
--
To view, visit https://gerrit.asterisk.org/5021
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3cc0128f93d352ed9add8d5c2f0f7232c2cbe4a
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
More information about the asterisk-code-review
mailing list