:: commit 0b4bc63c5ae6664f207f5db6129ddfbd045753ff

Kamila Szewczyk <27734421+kspalaiologos@users.noreply.github.com> — 2022-10-03 15:14

parents: 684857f7fd

fix #53

diff --git a/src/libbz3.c b/src/libbz3.c
index 9847e98..413967e 100644
--- a/src/libbz3.c
+++ b/src/libbz3.c
@@ -608,7 +608,7 @@ BZIP3_API s32 bz3_decode_block(struct bz3_state * state, u8 * buffer, s32 data_s
     }
 
     if (bwt_idx == -1) {
-        if (data_size > 64) {
+        if (data_size - 8 > 64) {
             state->last_error = BZ3_ERR_MALFORMED_HEADER;
             return -1;
         }
tab: 248 wrap: offon