]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: gus: fix null pointer dereference on pointer block
authorChengfeng Ye <cyeaa@connect.ust.hk>
Sun, 24 Oct 2021 10:46:11 +0000 (03:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:36:21 +0000 (11:36 +0100)
commitab4c1ebc40f699f48346f634d7b72b9c5193f315
tree1638edd6b88e5113f6a5fb947629239de2cf32e8
parent30b87dae35ea162b92166236389a64f381d969b5
ALSA: gus: fix null pointer dereference on pointer block

[ Upstream commit a0d21bb3279476c777434c40d969ea88ca64f9aa ]

The pointer block return from snd_gf1_dma_next_block could be
null, so there is a potential null pointer dereference issue.
Fix this by adding a null check before dereference.

Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
Link: https://lore.kernel.org/r/20211024104611.9919-1-cyeaa@connect.ust.hk
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/isa/gus/gus_dma.c