Commit cb562768 authored by Christian Gromm's avatar Christian Gromm Committed by Zheng Zengkai
Browse files

staging: most: sound: add sanity check for function argument



stable inclusion
from stable-5.10.21
commit 0cac694c2c05506fd84660be26225f0b2a2276c7
bugzilla: 50609

--------------------------------

[ Upstream commit 45b754ae ]

This patch checks the function parameter 'bytes' before doing the
subtraction to prevent memory corruption.

Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1612282865-21846-1-git-send-email-christian.gromm@microchip.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent a19a22e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment