Differences From Artifact [4e294b0368]:
- File
src/OFTarArchiveEntry.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: 4829) [annotate] [blame] [check-ins using]
To Artifact [c0d69369d6]:
- File
src/OFTarArchiveEntry.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: 4833) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
24 25 26 27 28 29 30 | #import "OFTarArchiveEntry+Private.h" #import "OFStream.h" #import "OFDate.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #import "OFTarArchiveEntry+Private.h" #import "OFStream.h" #import "OFDate.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" static OFString * stringFromBuffer(const char *buffer, size_t length) { for (size_t i = 0; i < length; i++) if (buffer[i] == '\0') length = i; return [OFString stringWithUTF8String: buffer |
︙ | ︙ | |||
54 55 56 57 58 59 60 | @synthesize fileName = _fileName, mode = _mode, size = _size; @synthesize modificationDate = _modificationDate, type = _type; @synthesize targetFileName = _targetFileName; @synthesize owner = _owner, group = _group; @synthesize deviceMajor = _deviceMajor, deviceMinor = _deviceMinor; - (instancetype)OF_initWithHeader: (char[512])header | | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | @synthesize fileName = _fileName, mode = _mode, size = _size; @synthesize modificationDate = _modificationDate, type = _type; @synthesize targetFileName = _targetFileName; @synthesize owner = _owner, group = _group; @synthesize deviceMajor = _deviceMajor, deviceMinor = _deviceMinor; - (instancetype)OF_initWithHeader: (char[512])header stream: (OFStream *)stream { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); _stream = [stream retain]; |
︙ | ︙ | |||
116 117 118 119 120 121 122 | [_targetFileName release]; [_owner release]; [_group release]; [super dealloc]; } | | | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | [_targetFileName release]; [_owner release]; [_group release]; [super dealloc]; } - (size_t)lowlevelReadIntoBuffer: (void *)buffer length: (size_t)length { size_t ret; if (_atEndOfStream) @throw [OFReadFailedException exceptionWithObject: self requestedLength: length]; |
︙ | ︙ | |||
177 178 179 180 181 182 183 | } if (_size % 512 != 0) [_stream readIntoBuffer: buffer exactLength: 512 - ((size_t)_size % 512)]; } | | | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | } if (_size % 512 != 0) [_stream readIntoBuffer: buffer exactLength: 512 - ((size_t)_size % 512)]; } - (OFString *)description { void *pool = objc_autoreleasePoolPush(); OFString *ret = [OFString stringWithFormat: @"<%@:\n" @"\tFile name = %@\n" @"\tMode = %06o\n" @"\tSize = %" PRIu64 @"\n" @"\tModification date = %@\n" |
︙ | ︙ |