diff --git a/plugins/codecs/ndlz/ndlz4x4.c b/plugins/codecs/ndlz/ndlz4x4.c index a7343a83..d24e9846 100644 --- a/plugins/codecs/ndlz/ndlz4x4.c +++ b/plugins/codecs/ndlz/ndlz4x4.c @@ -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; } diff --git a/plugins/codecs/ndlz/ndlz8x8.c b/plugins/codecs/ndlz/ndlz8x8.c index f8ffb769..930a5029 100644 --- a/plugins/codecs/ndlz/ndlz8x8.c +++ b/plugins/codecs/ndlz/ndlz8x8.c @@ -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; }