[asterisk-commits] mjordan: branch 13 r427585 - /branches/13/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 8 18:14:35 CST 2014


Author: mjordan
Date: Sat Nov  8 18:14:31 2014
New Revision: 427585

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=427585
Log:
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)


Modified:
    branches/13/apps/app_voicemail.c

Modified: branches/13/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/apps/app_voicemail.c?view=diff&rev=427585&r1=427584&r2=427585
==============================================================================
--- branches/13/apps/app_voicemail.c (original)
+++ branches/13/apps/app_voicemail.c Sat Nov  8 18:14:31 2014
@@ -5063,7 +5063,7 @@
 	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));




More information about the asterisk-commits mailing list