]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: most: sound: add sanity check for function argument
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 2 Feb 2021 16:21:05 +0000 (17:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Mar 2021 10:24:21 +0000 (11:24 +0100)
commit7ec6136f4118c715fc3f0791b8260f30f3d0b0ad
treecd36e41f01317907e1c7932739b7c60144a44e0a
parentff345e44ff381dffb342b6c9df7a66357f5339e4
staging: most: sound: add sanity check for function argument

[ Upstream commit 45b754ae5b82949dca2b6e74fa680313cefdc813 ]

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

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1612282865-21846-1-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/most/aim-sound/sound.c