$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: @"<"] == NSOrderedSame)