dts_header: initialize SUBSTREAM_LBR size to 0
authorThomas Guillem <thomas@gllm.fr>
Wed, 11 Sep 2024 06:15:52 +0000 (08:15 +0200)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 21 Jan 2025 18:02:47 +0000 (19:02 +0100)
It's a substream and can't work alone, so a size of 0 is legitimate.

Fixes #28773 (Use of uninitialised value)

(cherry picked from commit b23f09b258dc63c2221af502ec856630f68817e5)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Gbp-Pq: Name 0029-dts_header-initialize-SUBSTREAM_LBR-size-to-0.patch

modules/packetizer/dts_header.c

index 53249dd63765d769c791fa40e028a49d092bbfcd..8d6d5c8301faae0b646ee96690d54ad84f5e0389 100644 (file)
@@ -342,6 +342,7 @@ static int dts_header_ParseLBRExtSubstream( vlc_dts_header_t *p_header,
     bs_skip( &s, 16 );
     uint16_t nLBRScaledBitRate_LSW = bs_read( &s, 16 );
     p_header->i_bitrate = nLBRScaledBitRate_LSW | ((nLBRBitRateMSnybbles & 0xF0) << 12);
+    p_header->i_frame_size = 0;
     return VLC_SUCCESS;
 }