summaryrefslogtreecommitdiffstats
path: root/sound/core/compress_offload.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-01-29 11:07:24 +0100
committerTakashi Iwai <tiwai@suse.de>2019-01-29 11:07:48 +0100
commit286406c2e198b199c348447b3a7c54c6324db147 (patch)
treea193b6e6590e268ba46fe876146c3545d03599c0 /sound/core/compress_offload.c
parentb2e9e1c8810ee05c95f4d55800b8afae70ab01b4 (diff)
parente190161f96b88ffae870405fd6c3fdd1d2e7f98d (diff)
downloadlinux-286406c2e198b199c348447b3a7c54c6324db147.tar.bz2
Merge branch 'for-linus' into for-next
Pull 5.0 branch for further development of USB-audio quirks Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/compress_offload.c')
-rw-r--r--sound/core/compress_offload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index a5b09e75e787..f7d2b373da0a 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -541,7 +541,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 */