Overview
Comment: | OFGZIPStream: Fix reading CRC32 / size |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | 1.0 |
Files: | files | file ages | folders |
SHA3-256: |
7ba7612146b2744d725e9ac357a32ef3 |
User & Date: | js on 2024-01-27 23:58:23 |
Other Links: | branch diff | manifest | tags |
Context
2024-01-28
| ||
13:44 | GitHub Actions: Restore *BSD check-in: 66b1be33c7 user: js tags: 1.0 | |
2024-01-27
| ||
23:58 | OFGZIPStream: Fix reading CRC32 / size check-in: 7ba7612146 user: js tags: 1.0 | |
23:57 | OFGZIPStream: Fix reading CRC32 / size check-in: c814ea674d user: js tags: trunk | |
2024-01-21
| ||
12:07 | Set version to 1.0.8 check-in: 62e6835216 user: js tags: 1.0, 1.0.8-release | |
Changes
Modified src/OFGZIPStream.m from [1ebfe8e246] to [550f2ed31d].
︙ | ︙ | |||
246 247 248 249 250 251 252 | [_inflateStream release]; _inflateStream = nil; _state++; break; case OFGZIPStreamStateCRC32: | | > | | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | [_inflateStream release]; _inflateStream = nil; _state++; break; case OFGZIPStreamStateCRC32: _bytesRead += [_stream readIntoBuffer: _buffer + _bytesRead length: 4 - _bytesRead]; if (_bytesRead < 4) return 0; CRC32 = ((uint32_t)_buffer[3] << 24) | (_buffer[2] << 16) | (_buffer[1] << 8) | _buffer[0]; if (~_CRC32 != CRC32) { |
︙ | ︙ | |||
270 271 272 273 274 275 276 | } _bytesRead = 0; _CRC32 = ~0; _state++; break; case OFGZIPStreamStateUncompressedSize: | | > | > > > | | 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | } _bytesRead = 0; _CRC32 = ~0; _state++; break; case OFGZIPStreamStateUncompressedSize: _bytesRead += [_stream readIntoBuffer: _buffer + _bytesRead length: 4 - _bytesRead]; if (_bytesRead < 4) return 0; uncompressedSize = (_buffer[3] << 24) | (_buffer[2] << 16) | (_buffer[1] << 8) | _buffer[0]; if (_uncompressedSize != uncompressedSize) { OFString *actual = [OFString stringWithFormat: @"%" PRIu32, _uncompressedSize]; OFString *expected = [OFString stringWithFormat: @"%" PRIu32, uncompressedSize]; |
︙ | ︙ |