openbsd-ports/www/sogo/patches/patch-SoObjects_SOGo_NSString+Utilities_m
sebastia 392934d98e Major update to SOGo 2.0.2, essentially unfucking it on amd64.
Problem reported and tests from giovann@ and Jean Gerard
(jg at rilk.com).

finally OK giovanni@
same applies to the just updated SOPE, where I hit the go button
just too fast ;)
2012-10-30 15:09:53 +00:00

17 lines
731 B
Plaintext

$OpenBSD: patch-SoObjects_SOGo_NSString+Utilities_m,v 1.1 2012/10/30 15:09:53 sebastia Exp $
ugly hack to fix crasher, upstream is aware of it
--- SoObjects/SOGo/NSString+Utilities.m.orig Mon Oct 15 12:05:10 2012
+++ SoObjects/SOGo/NSString+Utilities.m Mon Oct 15 12:21:22 2012
@@ -134,6 +134,9 @@ static int cssEscapingCount;
start--;
start++;
+ if ([self length] - start < 4)
+ return NSMakeRange (start, [self length] - start);
+
// In [UIxMailPartTextViewer flatContentAsString], we first escape HTML entities and then
// add URLs. Therefore, the brackets (inequality signs <>) have been encoded at this point.
if ([[self substringWithRange: NSMakeRange (start, 4)] compare: @"&lt;"] == NSOrderedSame)