audio: fix wavcapture segfault
Commit 571a8c52 caused the HMP wavcapture command to segfault when processing audio data in audio_pcm_sw_write(), where a NULL sw->hw->pcm_ops is dereferenced. This fix checks that the pointer is valid before dereferincing it. A similar fix is also made in the parallel function audio_pcm_sw_read(). Fixes: 571a8c52 (audio: split ctl_* functions into enable_* and volume_*) Signed-off-by:Bruce Rogers <brogers@suse.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200521172931.121903-1-brogers@suse.com Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
Loading
Please register or sign in to comment