From: Mark Michelson Date: Mon, 22 Oct 2007 14:58:57 +0000 (+0000) Subject: Merged revisions 86694 via svnmerge from X-Git-Tag: 1.6.0-beta1~3^2~1123 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d5c98be1e69d94067a0083e6ff8d9b212c4f176;p=thirdparty%2Fasterisk.git Merged revisions 86694 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r86694 | mmichelson | 2007-10-22 09:48:46 -0500 (Mon, 22 Oct 2007) | 5 lines Account for the fact that sometimes headers may be terminated with \r\n instead of just \n (closes issue #11043, reported by yehavi) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86696 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 6fbb5b1db9..525342ea5e 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -9383,8 +9383,8 @@ static char *get_header_by_tag(char *header, char *tag, char *buf, size_t len) memset(buf, 0, len); ast_copy_string(buf, start+taglen, len); - eol_pnt = strchr(buf,'\n'); - *eol_pnt = '\0'; + if ((eol_pnt = strchr(buf,'\r')) || (eol_pnt = strchr(buf,'\n'))) + *eol_pnt = '\0'; return buf; }