]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When parsing the sections of voicemail.conf that contain mailbox definitions,
authorRussell Bryant <russell@russellbryant.com>
Tue, 26 Sep 2006 20:23:15 +0000 (20:23 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 26 Sep 2006 20:23:15 +0000 (20:23 +0000)
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

apps/app_voicemail.c

index b73887f7f256c97089f28aff7c9629fb0050d21e..70c9a17294d9ac8db66f5eab0b22dd4af1fd3461 100644 (file)
@@ -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));