Merged revisions 53530 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 8 Feb 2007 13:43:06 +0000 (13:43 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 8 Feb 2007 13:43:06 +0000 (13:43 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r53530 | tilghman | 2007-02-08 07:40:02 -0600 (Thu, 08 Feb 2007) | 10 lines

Merged revisions 53529 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53529 | tilghman | 2007-02-08 07:36:10 -0600 (Thu, 08 Feb 2007) | 2 lines

Issue 9003 - If fullname is empty, quote() passes back "\""

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53531 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 2b00e9b..b79ba96 100644 (file)
@@ -1883,7 +1883,7 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in
                                memset(passdata, 0, vmlen);
                                prep_email_sub_vars(ast, vmu, msgnum + 1, context, mailbox, cidnum, cidname, dur, date, passdata, vmlen, category);
                                pbx_substitute_variables_helper(ast, fromstring, passdata, vmlen);
-                               len_passdata = strlen(passdata) * 2 + 1;
+                               len_passdata = strlen(passdata) * 2 + 3;
                                passdata2 = alloca(len_passdata);
                                fprintf(p, "From: %s <%s>\r\n", quote(passdata, passdata2, len_passdata), who);
                        } else
@@ -1893,7 +1893,7 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in
                        ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
        } else
                fprintf(p, "From: Asterisk PBX <%s>\r\n", who);
-       len_passdata = strlen(vmu->fullname) * 2 + 1;
+       len_passdata = strlen(vmu->fullname) * 2 + 3;
        passdata2 = alloca(len_passdata);
        fprintf(p, "To: %s <%s>\r\n", quote(vmu->fullname, passdata2, len_passdata), vmu->email);
        if (emailsubject) {