From 2e8c6680fe8e80bb58eb3111e74125507c4b647e Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 6 Apr 2017 14:24:25 -0400 Subject: [PATCH] (fix) check if found before changing location --- SoObjects/SOGo/SOGoMailer.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SoObjects/SOGo/SOGoMailer.m b/SoObjects/SOGo/SOGoMailer.m index 6bee54102..95a06d874 100644 --- a/SoObjects/SOGo/SOGoMailer.m +++ b/SoObjects/SOGo/SOGoMailer.m @@ -373,7 +373,8 @@ r1 = [cleaned_message rangeOfCString: "\r\nBcc: " options: 0 range: NSMakeRange(0,limit)]; - r1.location += 2; + if (r1.location != NSNotFound) + r1.location += 2; } if (r1.location != NSNotFound)