Differences From Artifact [c2a59c307b]:
- File src/OFLHAArchiveEntry.m — part of check-in [4b6a09da4c] at 2024-02-24 13:29:10 on branch trunk — OFLHAArchiveEntry: Remove pointless check (user: js, size: 20272) [annotate] [blame] [check-ins using]
To Artifact [ed305bf072]:
- File
src/OFLHAArchiveEntry.m
— part of check-in
[d57a56449f]
at
2024-02-24 13:51:46
on branch trunk
— OFLHAArchiveEntry: Parse compression method last
This avoids trying to parse the compression method when the header level
is invalid. (user: js, size: 20272) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
340 341 342 343 344 345 346 | encoding: (OFStringEncoding)encoding { self = [super init]; @try { uint32_t date; | < < < < < | 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | encoding: (OFStringEncoding)encoding { self = [super init]; @try { uint32_t date; memcpy(&_compressedSize, header + 7, 4); _compressedSize = OFFromLittleEndian32((uint32_t)_compressedSize); memcpy(&_uncompressedSize, header + 11, 4); _uncompressedSize = OFFromLittleEndian32((uint32_t)_uncompressedSize); |
︙ | ︙ | |||
436 437 438 439 440 441 442 443 444 445 446 447 448 449 | @throw [OFUnsupportedVersionException exceptionWithVersion: version]; } if (_fileName == nil) @throw [OFInvalidFormatException exception]; [_extensions makeImmutable]; } @catch (id e) { [self release]; @throw e; } | > > > > > | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | @throw [OFUnsupportedVersionException exceptionWithVersion: version]; } if (_fileName == nil) @throw [OFInvalidFormatException exception]; _compressionMethod = [[OFString alloc] initWithCString: header + 2 encoding: OFStringEncodingASCII length: 5]; [_extensions makeImmutable]; } @catch (id e) { [self release]; @throw e; } |
︙ | ︙ |