Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 400ee3ce authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: qdsp6v2: add integer overflow check"

parents 087da49b a427bef6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1088,6 +1088,11 @@ int q6asm_audio_client_buf_alloc(unsigned int dir,
			return 0;
		}
		mutex_lock(&ac->cmd_lock);
		if (bufcnt > (LONG_MAX/sizeof(struct audio_buffer))) {
			pr_err("%s: Buffer size overflows", __func__);
			mutex_unlock(&ac->cmd_lock);
			goto fail;
		}
		buf = kzalloc(((sizeof(struct audio_buffer))*bufcnt),
				GFP_KERNEL);