Skip to content

Commit

Permalink
Fix for #120
Browse files Browse the repository at this point in the history
  • Loading branch information
kspalaiologos authored Dec 20, 2023
1 parent 7e73218 commit ba14bd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libbz3.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ BZIP3_API int bz3_compress(u32 block_size, const u8 * const in, u8 * out, size_t
struct bz3_state * state = bz3_new(block_size);
if (!state) return BZ3_ERR_INIT;

u8 * compression_buf = malloc(block_size);
u8 * compression_buf = malloc(bz3_bound(block_size));
if (!compression_buf) {
bz3_free(state);
return BZ3_ERR_INIT;
Expand Down

0 comments on commit ba14bd9

Please sign in to comment.