From f83d6a20a18e355fcd03ebc3ce0262536e524884 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 6 Apr 2017 11:02:59 -0400 Subject: [PATCH] (fix) protect ourself from broken SOPE/SOGo installs (fixes #4117) --- SoObjects/SOGo/SOGoMailer.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SoObjects/SOGo/SOGoMailer.m b/SoObjects/SOGo/SOGoMailer.m index 2dbaa4d73..ec7d2f061 100644 --- a/SoObjects/SOGo/SOGoMailer.m +++ b/SoObjects/SOGo/SOGoMailer.m @@ -364,9 +364,12 @@ // It does not, let's search in the entire headers if (r1.location == NSNotFound) - r1 = [cleaned_message rangeOfCString: "\r\nBcc: " - options: 0 - range: NSMakeRange(0,limit)]; + { + r1 = [cleaned_message rangeOfCString: "\r\nBcc: " + options: 0 + range: NSMakeRange(0,limit)]; + r1.location += 2; + } if (r1.location != NSNotFound) {