File: 0029-dts_header-initialize-SUBSTREAM_LBR-size-to-0.patch

package info (click to toggle)
vlc 3.0.21-10
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 212,728 kB
  • sloc: ansic: 441,379; cpp: 110,628; objc: 36,394; sh: 6,947; makefile: 6,592; javascript: 4,902; xml: 1,611; asm: 1,355; yacc: 640; python: 555; lex: 88; perl: 77; sed: 16
file content (26 lines) | stat: -rw-r--r-- 949 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Thomas Guillem <thomas@gllm.fr>
Date: Wed, 11 Sep 2024 08:15:52 +0200
Subject: dts_header: initialize SUBSTREAM_LBR size to 0

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>
---
 modules/packetizer/dts_header.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/packetizer/dts_header.c b/modules/packetizer/dts_header.c
index 53249dd..8d6d5c8 100644
--- a/modules/packetizer/dts_header.c
+++ b/modules/packetizer/dts_header.c
@@ -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;
 }