Revert "Revert "ANDROID: ASoC: compress: fix unsigned integer overflow check""

This reverts commit e00793e8f0.

Reason for revert: Subsequent to this commit, the identical patch came from upstream: commit d3645b0553 ("ASoC: compress: fix unsigned integer overflow check"). So this revert undid the upstream patch.

Change-Id: Ib33548fd77225f730f056a8a489a5e70155242ac
Signed-off-by: Todd Kjos <tkjos@google.com>
This commit is contained in:
Todd Kjos
2020-08-05 16:49:42 +00:00
parent 4467f11504
commit 15415a6a2a

View File

@@ -570,7 +570,7 @@ 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 > U32_MAX / params->buffer.fragment_size ||
params->buffer.fragments == 0)
return -EINVAL;