Differences From Artifact [0b7ef4c480]:
- File
src/exceptions/OFMemoryNotPartOfObjectException.m
— part of check-in
[7c2a0dda3d]
at
2017-05-07 15:39:31
on branch trunk
— Do not include any addresses in -[description]
This makes it harder to accidentally leak addresses which could be used
to defeat ASLR. (user: js, size: 1483) [annotate] [blame] [check-ins using]
To Artifact [b8b6e69018]:
- File
src/exceptions/OFMemoryNotPartOfObjectException.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 1486) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
18 19 20 21 22 23 24 | #import "OFMemoryNotPartOfObjectException.h" #import "OFString.h" @implementation OFMemoryNotPartOfObjectException @synthesize pointer = _pointer, object = _object; | | | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | #import "OFMemoryNotPartOfObjectException.h" #import "OFString.h" @implementation OFMemoryNotPartOfObjectException @synthesize pointer = _pointer, object = _object; + (instancetype)exceptionWithPointer: (void *)pointer object: (id)object { return [[[self alloc] initWithPointer: pointer object: object] autorelease]; } - init { OF_INVALID_INIT_METHOD } - initWithPointer: (void *)pointer object: (id)object { self = [super init]; _pointer = pointer; _object = [object retain]; return self; } - (void)dealloc { [_object release]; [super dealloc]; } - (OFString *)description { return [OFString stringWithFormat: @"Deallocation or reallocation of memory not allocated as part of " @"object of type %@ was attempted! It is also possible that there " @"was an attempt to free the same memory twice.", [_object class]]; } @end |