--- a/Frameworks/Adium Framework/Source/AIAccount.h Tue Aug 07 13:05:53 2012 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccount.h Wed Aug 08 16:21:21 2012 +0200
@@ -186,11 +186,17 @@
NSDate *waitingToReconnect;
+ BOOL isWaitingForNetwork; NSInteger connectionProgressPercent;
NSString *connectionProgressString;
+ BOOL mustPromptForPasswordOnNextConnect; NSString *currentDisplayName;
--- a/Frameworks/Adium Framework/Source/AIChat.h Tue Aug 07 13:05:53 2012 -0500
+++ b/Frameworks/Adium Framework/Source/AIChat.h Wed Aug 08 16:21:21 2012 +0200
@@ -133,6 +133,8 @@
NSDictionary *chatCreationInfo;
NSInteger unviewedMention;
NSInteger unviewedContent;
@@ -142,6 +144,8 @@
NSDictionary *securityDetails;
+ BOOL secureMessagingLastEncryptedState; AIListContact *topicSetter;
--- a/Frameworks/Adium Framework/Source/AIListContact.h Tue Aug 07 13:05:53 2012 -0500
+++ b/Frameworks/Adium Framework/Source/AIListContact.h Wed Aug 08 16:21:21 2012 +0200
@@ -34,17 +34,26 @@
NSAttributedString *textProfile;
NSString *serverDisplayName;
- (id)initWithUID:(NSString *)inUID account:(AIAccount *)inAccount service:(AIService *)inService;
--- a/Frameworks/Adium Framework/Source/AIListObject.h Tue Aug 07 13:05:53 2012 -0500
+++ b/Frameworks/Adium Framework/Source/AIListObject.h Wed Aug 08 16:21:21 2012 +0200
@@ -102,6 +102,9 @@
NSInteger unviewedContent;
NSInteger unviewedMention;
--- a/Frameworks/Adium Framework/Source/ESObjectWithProperties.m Tue Aug 07 13:05:53 2012 -0500
+++ b/Frameworks/Adium Framework/Source/ESObjectWithProperties.m Wed Aug 08 16:21:21 2012 +0200
@@ -79,8 +79,14 @@
[self willChangeValueForKey:key];
- Ivar ivar = class_getInstanceVariable([self class], [key UTF8String]);
+ char property_name[256]; + NSAssert([key length] < 256, @"Too long property!"); + [key getCString:property_name maxLength:32 encoding:NSUTF8StringEncoding]; + Ivar ivar = class_getInstanceVariable([self class], property_name); // fall back to the dictionary
@@ -107,16 +113,16 @@
} else if (strcmp(ivarType, @encode(NSInteger)) == 0) {
+ NSInteger *idx = (NSInteger*)((char *)self + ivar_getOffset(ivar)); + NSInteger iValue = [value integerValue];
- iValue = [value integerValue];
+ } else if (strcmp(ivarType, @encode(BOOL)) == 0) { - object_setIvar(self, ivar, (void *)iValue);
+ BOOL *idx = (BOOL*)((char *)self + ivar_getOffset(ivar)); + BOOL iValue = [value boolValue]; @@ -202,7 +208,13 @@
- Ivar ivar = object_getInstanceVariable(self, [key UTF8String], (void **)&value);
+ char property_name[256]; + NSAssert([key length] < 256, @"Too long property!"); + [key getCString:property_name maxLength:32 encoding:NSUTF8StringEncoding]; + Ivar ivar = object_getInstanceVariable(self, property_name, (void **)&value); @@ -218,6 +230,9 @@
// attempt to wrap it, if we know how
if (strcmp(ivarType, @encode(NSInteger)) == 0) {
ret = [[[NSNumber alloc] initWithInteger:(NSInteger)value] autorelease];
+ } else if (strcmp(ivarType, @encode(BOOL)) == 0) { + BOOL *idx = (BOOL*)((char *)self + ivar_getOffset(ivar)); + ret = [NSNumber numberWithBool:*idx]; } else if (ivarType[0] != _C_ID) {
AILogWithSignature(@" *** This ivar is not an object but an %s! Should not use -valueForProperty: @\"%@\" ***", ivarType, key);
@@ -237,7 +252,13 @@
- Ivar ivar = class_getInstanceVariable([self class], [key UTF8String]);
+ char property_name[256]; + NSAssert([key length] < 256, @"Too long property!"); + [key getCString:property_name maxLength:32 encoding:NSUTF8StringEncoding]; + Ivar ivar = class_getInstanceVariable([self class], property_name); NSNumber *number = [self numberValueForProperty:key];
@@ -270,8 +291,27 @@
- NSNumber *number = [self numberValueForProperty:key];
- ret = number ? [number boolValue] : NO;
+ char property_name[256]; + NSAssert([key length] < 256, @"Too long property!"); + [key getCString:property_name maxLength:32 encoding:NSUTF8StringEncoding]; + Ivar ivar = class_getInstanceVariable([self class], property_name); + NSNumber *number = [self numberValueForProperty:key]; + ret = number ? [number boolValue] : NO; + const char *ivarType = ivar_getTypeEncoding(ivar); + if (strcmp(ivarType, @encode(BOOL)) != 0) { + AILogWithSignature(@"%@'s %@ ivar is not a BOOL but an %s! Will attempt to cast, but should not use -boolValueForProperty: @\"%@\"", self, key, ivarType, key); + BOOL *idx = (BOOL*)((char *)self + ivar_getOffset(ivar)); + ret = (NSInteger)(*idx);