From fd7f15c81e758efc58d61d2c7979a4a6b5b61245 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 1 Jun 2012 14:22:28 +0000 Subject: [PATCH] Monotone-Parent: 6a6bbe9da76e6e30fd9ce63cf4a8c7677f5f61a0 Monotone-Revision: 40b7c19f2c07d8bd5fbb6e2cc45cba387e15d768 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-06-01T14:22:28 --- ChangeLog | 4 ++++ UI/MailPartViewers/UIxMailPartAlternativeViewer.m | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1dc42a6c..0eeea2b02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-06-01 Wolfgang Sourdeau + * UI/MailPartViewers/UIxMailPartAlternativeViewer.m + (-childPartName): fixed a potential crash by building the NSString + from the integer itself, with the proper format string. + * SoObjects/SOGo/NSString+Crypto.m (-isEqualToCrypted:withDefaultScheme:): invoke "intValue" rather than "integerValue" on the encoding number as the int type is not diff --git a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m index 16e15d24d..65d30b76a 100644 --- a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m +++ b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m @@ -174,11 +174,8 @@ - (NSString *) childPartName { - char buf[8]; - - sprintf (buf, "%"PRIuPTR"", [self childIndex] + 1); - - return [NSString stringWithCString:buf]; + return [NSString stringWithFormat: @"%u", + (unsigned int) ([self childIndex] + 1)]; } - (id) childPartPath