From: Mark Michelson Date: Mon, 22 Oct 2007 14:48:46 +0000 (+0000) Subject: Account for the fact that sometimes headers may be terminated with \r\n instead of... X-Git-Tag: 1.4.14~112 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=222302c0a227e0bd4870fa6bde99b0caf043329f;p=thirdparty%2Fasterisk.git 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/branches/1.4@86694 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 756dce48db..27f14e9549 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -8720,8 +8720,8 @@ static char *get_header_by_tag(char *header, char *tag) ast_mutex_lock(&imaptemp_lock); ast_copy_string(imaptemp, start+taglen, sizeof(imaptemp)); ast_mutex_unlock(&imaptemp_lock); - eol_pnt = strchr(imaptemp,'\n'); - *eol_pnt = '\0'; + if ((eol_pnt = strchr(imaptemp,'\r')) || (eol_pnt = strchr(imaptemp,'\n'))) + *eol_pnt = '\0'; return imaptemp; }