aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-26 20:23:15 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-26 20:23:15 +0000
commitfcad1f5a37eabd810e4e780281c973f0e2548c89 (patch)
tree9d577c48ebbb9f987d4454469cadd000ccbd0c2b /apps
parent6c39ba12b7260b82a3464f3e3cacfe2612fcb94e (diff)
When parsing the sections of voicemail.conf that contain mailbox definitions,
don't introduce a length limit on the definition by using a 256 byte temporary storage buffer. Instead, make the temporary buffer just as big as it needs to be to hold the entire mailbox definition. (fixes BE-68) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@43699 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index b73887f7f..70c9a1729 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5545,12 +5545,13 @@ static int vm_exec(struct ast_channel *chan, void *data)
static int append_mailbox(char *context, char *mbox, char *data)
{
/* Assumes lock is already held */
- char tmp[256] = "";
+ char *tmp;
char *stringp;
char *s;
struct ast_vm_user *vmu;
- ast_copy_string(tmp, data, sizeof(tmp));
+ tmp = ast_strdupa(data);
+
vmu = malloc(sizeof(struct ast_vm_user));
if (vmu) {
memset(vmu, 0, sizeof(struct ast_vm_user));