Skip to content

Commit

Permalink
Another attempt at fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Apr 6, 2024
1 parent a1fb572 commit 9cc79a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/codecs/ndlz/ndlz4x4.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ int ndlz4_decompress(const uint8_t *input, int32_t input_len, uint8_t *output, i
eshape[0] = ((blockshape[0] + 3) / 4) * 4;
eshape[1] = ((blockshape[1] + 3) / 4) * 4;

if (NDLZ_UNEXPECT_CONDITIONAL(output_len < blockshape[0] * blockshape[1])) {
if (NDLZ_UNEXPECT_CONDITIONAL((int64_t)output_len < (int64_t)blockshape[0] * (int64_t)blockshape[1])) {
BLOSC_TRACE_ERROR("The blockshape is bigger than the output buffer");
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/codecs/ndlz/ndlz8x8.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ int ndlz8_decompress(const uint8_t *input, int32_t input_len, uint8_t *output, i
eshape[0] = ((blockshape[0] + 7) / cell_shape) * cell_shape;
eshape[1] = ((blockshape[1] + 7) / cell_shape) * cell_shape;

if (NDLZ_UNEXPECT_CONDITIONAL(output_len < blockshape[0] * blockshape[1])) {
if (NDLZ_UNEXPECT_CONDITIONAL((int64_t)output_len < (int64_t)blockshape[0] * (int64_t)blockshape[1])) {
BLOSC_TRACE_ERROR("The blockshape is bigger than the output buffer");
return 0;
}
Expand Down

0 comments on commit 9cc79a7

Please sign in to comment.