1
0
mirror of https://github.com/kspalaiologos/bzip3.git synced 2026-10-23 14:48:53 +03:00
This commit is contained in:
Kamila Szewczyk
2026-06-14 09:52:18 +02:00
committed by GitHub
parent 97a6da2e51
commit b9aacb60d1

View File

@@ -963,7 +963,7 @@ BZIP3_API int bz3_decompress(const uint8_t * in, uint8_t * out, size_t in_size,
return BZ3_ERR_MALFORMED_HEADER;
}
s32 size = read_neutral_s32(in);
if (size < 0 || size > block_size) goto malformed_header;
if (size < 0 || size > (s32)bz3_bound(block_size)) goto malformed_header;
if (in_size < size + 8) {
bz3_free(state);
free(compression_buf);