]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Account for the fact that sometimes headers may be terminated with \r\n instead of...
authorMark Michelson <mmichelson@digium.com>
Mon, 22 Oct 2007 14:48:46 +0000 (14:48 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 22 Oct 2007 14:48:46 +0000 (14:48 +0000)
(closes issue #11043, reported by yehavi)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86694 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 756dce48dbc4d7b130a4d1f6e704bc7c529ed7f2..27f14e95497c03872761c5fd4f9f82154c5ad19f 100644 (file)
@@ -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;
 }