diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-08 13:36:10 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-08 13:36:10 +0000 |
commit | 61ae4461a9118022178aeb3e4a2107ece1948580 (patch) | |
tree | 991e5e0b00a31a675be0ffe84c047eb3e4e620de /apps/app_voicemail.c | |
parent | 0cfbb41d14d6b2f1aa439288b312c92a1a6c2004 (diff) |
Issue 9003 - If fullname is empty, quote() passes back "\""
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@53529 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 47896a0d6..c857096ee 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1746,7 +1746,7 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *c memset(passdata, 0, vmlen); prep_email_sub_vars(ast,vmu,msgnum + 1,context,mailbox,cidnum, cidname,dur,date,passdata, vmlen); 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>\n", quote(passdata, passdata2, len_passdata), who); } else ast_log(LOG_WARNING, "Cannot allocate workspace for variable substitution\n"); @@ -1754,7 +1754,7 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *c } else ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n"); } else fprintf(p, "From: Asterisk PBX <%s>\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>\n", quote(vmu->fullname, passdata2, len_passdata), vmu->email); |