File: 0080-hds-fix-crash-if-bootstrap-data-or-URL-are-missing.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 (31 lines) | stat: -rw-r--r-- 1,267 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
27
28
29
30
31
From: Tristan Matthews <tmatth@videolan.org>
Date: Wed, 16 Oct 2024 15:29:35 -0400
Subject: hds: fix crash if bootstrap data or URL are missing

(cherry picked from commit 01934b339cf5f467c9c2e3a7fb61c7458347684c)
---
 modules/stream_filter/hds/hds.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 631691f..4d55538 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -1557,7 +1557,7 @@ static int parse_Manifest( stream_t *s, manifest_t *m )
                     new_stream->metadata_len = medias[i].metadata_len;
                 }
 
-                if( ! sys->live )
+                if( ! sys->live && bootstraps[j].data )
                 {
                     parse_BootstrapData( (vlc_object_t*)s,
                                          new_stream,
@@ -1579,7 +1579,7 @@ static int parse_Manifest( stream_t *s, manifest_t *m )
                             total_duration += chunk->duration;
                     }
                 }
-                else
+                else if( bootstraps[j].url )
                 {
                     if( !(new_stream->abst_url = strdup( bootstraps[j].url ) ) )
                     {