Skip to content

Commit

Permalink
Fix extended method types parsing on 32-bit binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
0xced committed Feb 26, 2013
1 parent 01679db commit e4fc432
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/CDObjectiveC2Processor.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ - (CDOCProtocol *)protocolAtAddress:(uint64_t)address;
objc2Protocol.extendedMethodTypes = 0;

CDMachOFileDataCursor *extendedMethodTypesCursor = nil;
BOOL hasExtendedMethodTypesField = objc2Protocol.size >= (offsetof(struct cd_objc2_protocol, extendedMethodTypes) + sizeof(objc2Protocol.extendedMethodTypes));
BOOL hasExtendedMethodTypesField = objc2Protocol.size > 8 * [self.machOFile ptrSize] + 2 * sizeof(uint32_t);
if (hasExtendedMethodTypesField) {
objc2Protocol.extendedMethodTypes = [cursor readPtr];
if (objc2Protocol.extendedMethodTypes != 0) {
Expand Down

0 comments on commit e4fc432

Please sign in to comment.