aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-22 14:48:46 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-22 14:48:46 +0000
commitf5e16a04f1126c79d50ea080fec9a14fda05b566 (patch)
treea96f93c5aafc45a8f1cbd5d44780f86190ebf96b /apps
parent9b79b4183bd0b8009476e9758d19d82b535389dc (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@86694 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 756dce48d..27f14e954 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;
}