From: Russell Bryant Date: Tue, 26 Sep 2006 20:23:15 +0000 (+0000) Subject: When parsing the sections of voicemail.conf that contain mailbox definitions, X-Git-Tag: 1.2.13~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0da756f2a4a6ed23372fbeb5db6e637bc8a425d;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/branches/1.2@43699 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index b73887f7f2..70c9a17294 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));