From: Wilfried Goesgens Date: Sun, 22 Sep 2013 14:31:02 +0000 (+0200) Subject: fix possible endless loop X-Git-Tag: v9.01~247 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=43dada25c4a28e98657ddb869c5a9c1caae424a1 fix possible endless loop --- 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; }