[vlc-commits] [Git][videolan/vlc][3.0.x] 3 commits: subtitle: fix vlc_stream_Peek() read into an unsigned value

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Dec 19 08:18:27 UTC 2025



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
f501d7c1 by Steve Lhomme at 2025-12-19T07:53:38+00:00
subtitle: fix vlc_stream_Peek() read into an unsigned value

We need to check errors in vlc_stream_Peek() calls.

Fixes #29377

(cherry picked from commit 6bbf8be995e51db335b244b495874dfe12514542)

- - - - -
12bf31e0 by Steve Lhomme at 2025-12-19T07:53:38+00:00
demux: webvtt: fix vlc_stream_Peek() read into an unsigned value

We need to check errors in vlc_stream_Peek() calls.

(cherry picked from commit 66d7893235329bd53e39bbb60e16def75e6bb94c)

- - - - -
043d9e7c by Steve Lhomme at 2025-12-19T07:53:38+00:00
bluray: read vlc_stream_Peek() into a signed value

Only 2048 is accepted so it does not matter too much if a size_t is used,
but it's cleaner.

(cherry picked from commit 5aebff101357c14f659c9647d03d9e6a41a8ccc2)

- - - - -


3 changed files:

- modules/access/bluray.c
- modules/demux/subtitle.c
- modules/demux/webvtt.c


Changes:

=====================================
modules/access/bluray.c
=====================================
@@ -617,7 +617,7 @@ static int probeStream(demux_t *p_demux)
     }
 
     /* first sector(s) should be filled with zeros */
-    size_t i_peek;
+    ssize_t i_peek;
     const uint8_t *p_peek;
     i_peek = vlc_stream_Peek( p_demux->s, &p_peek, 2048 );
     if( i_peek != 2048 ) {


=====================================
modules/demux/subtitle.c
=====================================
@@ -382,7 +382,7 @@ static int Open ( vlc_object_t *p_this )
     const uint64_t i_start_pos = vlc_stream_Tell( p_demux->s );
 #endif
 
-    size_t i_peek;
+    ssize_t i_peek;
     const uint8_t *p_peek;
     if( vlc_stream_Peek( p_demux->s, &p_peek, 16 ) < 16 )
     {


=====================================
modules/demux/webvtt.c
=====================================
@@ -616,7 +616,7 @@ static int DemuxStream( demux_t *p_demux )
 static int ProbeWEBVTT( demux_t *p_demux )
 {
     const uint8_t *p_peek;
-    size_t i_peek = vlc_stream_Peek( p_demux->s, &p_peek, 16 );
+    ssize_t i_peek = vlc_stream_Peek( p_demux->s, &p_peek, 16 );
     if( i_peek < 16 )
         return VLC_EGENERIC;
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3697ebcb2716cb4f9c7824b11ce33afefb0212ab...043d9e7cf47d5db3e8c1796887689102b6192681

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3697ebcb2716cb4f9c7824b11ce33afefb0212ab...043d9e7cf47d5db3e8c1796887689102b6192681
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list