From 85effb25129999bee967e69ecb41ba5bc8f8cbc7 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 10 Jan 2012 17:35:01 +0000 Subject: [PATCH] Monotone-Parent: d9f13a2035f812bf584e6ed63e858a9373cd11c8 Monotone-Revision: 38edb6b526df653889b897cf6ff9643dfd3ffad2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-01-10T17:35:01 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ OpenChange/MAPIStoreMailFolder.m | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bdb612633..f0f686be9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-01-10 Wolfgang Sourdeau + + * OpenChange/MAPIStoreMailFolder.m (_parseCOPYUID): the uniString + buffer was allocated one byte too short. + 2012-01-09 Wolfgang Sourdeau * OpenChange/NSObject+MAPIStore.m (-getValue:forTag:inMemCtx:): diff --git a/OpenChange/MAPIStoreMailFolder.m b/OpenChange/MAPIStoreMailFolder.m index 393788914..5df5bf0ef 100644 --- a/OpenChange/MAPIStoreMailFolder.m +++ b/OpenChange/MAPIStoreMailFolder.m @@ -848,7 +848,7 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP) /* sample: 1 OK [COPYUID 1311899334 1:3 11:13] Completed */ max = [line length]; - uniString = NSZoneMalloc (NULL, max * sizeof (unichar) + 1); + uniString = NSZoneMalloc (NULL, sizeof (unichar) * (max + 1)); [line getCharacters: uniString]; uniString[max] = 0;