Skip to content

Commit

Permalink
Restrict objc2 ivar offset to 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
0xced committed Sep 11, 2013
1 parent 9bf3446 commit 93e7c6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/CDObjectiveC2Processor.m
Expand Up @@ -406,7 +406,7 @@ - (NSArray *)loadIvarsAtAddress:(uint64_t)address;
NSString *name = [self.machOFile stringAtAddress:objc2Ivar.name];
NSString *typeString = [self.machOFile stringAtAddress:objc2Ivar.type];
CDMachOFileDataCursor *offsetCursor = [[CDMachOFileDataCursor alloc] initWithFile:self.machOFile address:objc2Ivar.offset];
NSUInteger offset = [offsetCursor readPtr];
NSUInteger offset = (uint32_t)[offsetCursor readPtr]; // objc-runtime-new.h: "offset is 64-bit by accident" => restrict to 32-bit

CDOCInstanceVariable *ivar = [[CDOCInstanceVariable alloc] initWithName:name typeString:typeString offset:offset];
[ivars addObject:ivar];
Expand Down

0 comments on commit 93e7c6a

Please sign in to comment.