[vlc-devel] [3.0 backport] sndio: fix crash when volume is adjusted while stopped
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Mon Jun 7 07:40:09 UTC 2021
On Mon, Jun 7, 2021, at 7:19 AM, Thomas Guillem wrote:
> From: Brad Smith <brad at comstyle.com>
>
> Set volume/mute function pointers when handle is freed, to ensure
> sio_setvol() is not called on a freed handle. Fixes crashes when volume
> is adjusted while playback is stopped.
>
> Fixes #25796
>
> (cherry picked from commit e94b04c8f867382ce6835254d29ee54fe855c686)
> Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> ---
> modules/audio_output/sndio.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/modules/audio_output/sndio.c b/modules/audio_output/sndio.c
> index 6ea78dd2fa..3dba2b81e5 100644
> --- a/modules/audio_output/sndio.c
> +++ b/modules/audio_output/sndio.c
> @@ -208,6 +208,8 @@ static void Stop (audio_output_t *aout)
> {
> aout_sys_t *sys = aout->sys;
>
> + aout->volume_set = NULL;
> + aout->mute_set = NULL;
> sio_close (sys->hdl);
> }
>
LGTM
--
Hugo Beauzée-Luyssen
hugo at beauzee.fr
More information about the vlc-devel
mailing list