]> git.baikalelectronics.ru Git - kernel.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)
committerTakashi Iwai <tiwai@suse.de>
Tue, 26 Oct 2021 06:02:16 +0000 (08:02 +0200)
commit6632606f3a26b063718d398eb6da0a1b822a2ffc
treea710bb3a32acc98345c92374c5aa9bb4dcfd747c
parent036d5c1762a5d5e67b405aaf5155bfd4dd1505c2
ALSA: gus: fix null pointer dereference on pointer block

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>
sound/isa/gus/gus_dma.c