Differences From Artifact [75090f7155]:
- File
src/OFZIPArchiveEntry.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: 8563) [annotate] [blame] [check-ins using]
To Artifact [7d2a571c32]:
- File
src/OFZIPArchiveEntry.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: 8572) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
24 25 26 27 28 29 30 | #import "OFDataArray.h" #import "OFDate.h" #import "OFStream.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #import "OFDataArray.h" #import "OFDate.h" #import "OFStream.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" extern uint32_t of_zip_archive_read_field32(uint8_t **, uint16_t *); extern uint64_t of_zip_archive_read_field64(uint8_t **, uint16_t *); OFString * of_zip_archive_entry_version_to_string(uint16_t version) { const char *attrCompat = NULL; switch (version >> 8) { case OF_ZIP_ARCHIVE_ENTRY_ATTR_COMPAT_MSDOS: attrCompat = "MS-DOS or OS/2"; |
︙ | ︙ | |||
151 152 153 154 155 156 157 | @synthesize CRC32 = _CRC32; @synthesize versionSpecificAttributes = _versionSpecificAttributes; @synthesize generalPurposeBitFlag = _generalPurposeBitFlag; @synthesize OF_lastModifiedFileTime = _lastModifiedFileTime; @synthesize OF_lastModifiedFileDate = _lastModifiedFileDate; @synthesize OF_localFileHeaderOffset = _localFileHeaderOffset; | | | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | @synthesize CRC32 = _CRC32; @synthesize versionSpecificAttributes = _versionSpecificAttributes; @synthesize generalPurposeBitFlag = _generalPurposeBitFlag; @synthesize OF_lastModifiedFileTime = _lastModifiedFileTime; @synthesize OF_lastModifiedFileDate = _lastModifiedFileDate; @synthesize OF_localFileHeaderOffset = _localFileHeaderOffset; - (instancetype)OF_initWithStream: (OFStream *)stream { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); uint16_t fileNameLength, extraFieldLength, fileCommentLength; of_string_encoding_t encoding; |
︙ | ︙ | |||
233 234 235 236 237 238 239 | [_fileName release]; [_extraField release]; [_fileComment release]; [super dealloc]; } | | | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | [_fileName release]; [_extraField release]; [_fileComment release]; [super dealloc]; } - (OFDate *)modificationDate { void *pool = objc_autoreleasePoolPush(); uint16_t year = ((_lastModifiedFileDate & 0xFE00) >> 9) + 1980; uint8_t month = (_lastModifiedFileDate & 0x1E0) >> 5; uint8_t day = (_lastModifiedFileDate & 0x1F); uint8_t hour = (_lastModifiedFileTime & 0xF800) >> 11; uint8_t minute = (_lastModifiedFileTime & 0x7E0) >> 5; |
︙ | ︙ | |||
257 258 259 260 261 262 263 | format: @"%Y-%m-%d %H:%M:%S"]; objc_autoreleasePoolPop(pool); return [date autorelease]; } | | | | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | format: @"%Y-%m-%d %H:%M:%S"]; objc_autoreleasePoolPop(pool); return [date autorelease]; } - (OFDataArray *)extraField { return [[_extraField copy] autorelease]; } - (OFString *)description { void *pool = objc_autoreleasePoolPush(); OFString *ret = [OFString stringWithFormat: @"<%@:\n" @"\tFile name = %@\n" @"\tFile comment = %@\n" @"\tGeneral purpose bit flag = %u\n" @"\tCompression method = %u\n" |
︙ | ︙ |