From eeb4646138e6d45929f79e3984b6d0d9760eeb7f Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 2 Dec 2010 21:25:37 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 30bbdf4da27d8db206b6667bf81195db2d889439 Monotone-Revision: b625ae81603b1c11c8c8244835607acd3e424a14 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-12-02T21:25:37 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ Main/SOGo+DAV.m | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index c8092fa7d..208f5d463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-12-02 Ludovic Marcotte + + * Main/SOGo+DAV.m - we avoid assuming a range is found + and check for it, running no location if necessary + 2010-12-01 Wolfgang Sourdeau * OpenChange/MAPIStoreContext.m: prevent leaks by adding an diff --git a/Main/SOGo+DAV.m b/Main/SOGo+DAV.m index b3deabb4c..7e8796dfd 100644 --- a/Main/SOGo+DAV.m +++ b/Main/SOGo+DAV.m @@ -321,8 +321,16 @@ NSRange substringRange; substringRange = [value rangeOfString: @"/SOGo/dav/"]; + + if (substringRange.location == NSNotFound) + return; + value = [value substringFromIndex: NSMaxRange (substringRange)]; substringRange = [value rangeOfString: @"/Calendar"]; + + if (substringRange.location == NSNotFound) + return; + value = [value substringToIndex: substringRange.location]; collection = [[SOGoUser userWithLogin: value] homeFolderInContext: localContext];