summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-11-09 00:14:31 +0000
committerMatthew Jordan <mjordan@digium.com>2014-11-09 00:14:31 +0000
commitffe194fd78a598931a8278ccf29d845460086dfe (patch)
tree206d19ae5fb2b66fc01c874061559385e99ff68d /apps/app_voicemail.c
parent266c022a45e6a8325a5928e0303926f60928ba5d (diff)
app_voicemail: Fix enhancement that allowed multiple recipients in To: header
An issue existed in r420577, which added multiple recipients to voicemail emails. The patch, when looking at the intended recipients, looked ahead for the '|' character inside a while loop which already had pulled out the appropriate field parsing on the '|' character. This would cause it to skip the recipients. This patch fixes it such that it relies completely on the while loop to parse through the e-mail fields. Note that the original author of the patch looked at this fix and approved it. ASTERISK-24250 #close Reported by: abelbeck patches: voicemail-420577-to-comma-fix.diff uploaded by abelbeck (License 5903) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@427585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 0ebad3d27..97322dfa5 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5063,7 +5063,7 @@ static void make_email_file(FILE *p,
fprintf(p, "To:");
first_line = 1;
while ((email = strsep(&emailsbuf, "|"))) {
- char *next = strchr(S_OR(emailsbuf, ""), '|');
+ char *next = emailsbuf;
if (check_mime(vmu->fullname)) {
char *ptr;
ast_str_encode_mime(&str2, 0, vmu->fullname, first_line ? strlen("To: ") : 0, strlen(email) + 3 + (next ? strlen(",") : 0));