From 43dada25c4a28e98657ddb869c5a9c1caae424a1 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 22 Sep 2013 16:31:02 +0200 Subject: [PATCH] fix possible endless loop --- citadel/modules/smtp/serv_smtpqueue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/citadel/modules/smtp/serv_smtpqueue.c b/citadel/modules/smtp/serv_smtpqueue.c index 1a5761b6b..99b9d0795 100644 --- a/citadel/modules/smtp/serv_smtpqueue.c +++ b/citadel/modules/smtp/serv_smtpqueue.c @@ -853,7 +853,10 @@ void smtp_do_procmsg(long msgnum, void *userdata) { /* Strip out the headers (no not amd any other non-instruction) line */ while (pch != NULL) { pch = strchr(pch, '\n'); - if ((pch != NULL) && (*(pch + 1) == '\n')) { + if ((pch != NULL) && + ((*(pch + 1) == '\n') || + (*(pch + 1) == '\r'))) + { instr = pch + 2; pch = NULL; } -- 2.30.2