From d7d0bbf8be47bd242ab69375e39d3cf5754f8631 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 11 May 2022 16:27:56 +0200 Subject: [PATCH] decoder: update i_bitspersample The field i_bytes_per_frame was updated, but not i_bitspersample, causing an inconsistency leading to a buffer overflow. Fixes #26930 --- src/input/decoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/input/decoder.c b/src/input/decoder.c index 00d38e05fd..df061f98ca 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -405,6 +405,8 @@ static int aout_update_format( decoder_t *p_dec ) p_dec->fmt_out.audio.i_bytes_per_frame = p_owner->fmt.audio.i_bytes_per_frame; + p_dec->fmt_out.audio.i_bitspersample = + p_owner->fmt.audio.i_bitspersample; p_dec->fmt_out.audio.i_frame_length = p_owner->fmt.audio.i_frame_length; }