:: commit 48928f4627b55b2f741e980904a4f84e531c8828

Kamila Szewczyk <27734421+kspalaiologos@users.noreply.github.com> — 2024-05-19 20:10

parents: f55631be09

fix #131.

diff --git a/src/libbz3.c b/src/libbz3.c
index 285cd27..ad94182 100644
--- a/src/libbz3.c
+++ b/src/libbz3.c
@@ -682,7 +682,7 @@ BZIP3_API s32 bz3_decode_block(struct bz3_state * state, u8 * buffer, s32 data_s
     decode_bytes(state->cm_state, b2, size_src);
     swap(b1, b2);
 
-    if (bwt_idx >= size_src) {
+    if (bwt_idx > size_src) {
         state->last_error = BZ3_ERR_MALFORMED_HEADER;
         return -1;
     }
tab: 248 wrap: offon