diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 26b5e245b0747dce67fb3c8aad3ca0d5f513a194..8b78ddffa509ab2598f17219c11792307cc50357 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -529,7 +529,8 @@ static int snd_compress_check_input(struct snd_compr_params *params) { /* first let's check the buffer parameter's */ if (params->buffer.fragment_size == 0 || - params->buffer.fragments > INT_MAX / params->buffer.fragment_size) + params->buffer.fragments > INT_MAX / params->buffer.fragment_size || + params->buffer.fragments == 0) return -EINVAL; /* now codec parameters */