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

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Dec 16 07:38:09 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
6bbf8be9 by Steve Lhomme at 2025-12-16T07:13:09+00:00
subtitle: fix vlc_stream_Peek() read into an unsigned value

We need to check errors in vlc_stream_Peek() calls.

Fixes #29377

- - - - -
66d78932 by Steve Lhomme at 2025-12-16T07:13:09+00:00
demux: webvtt: fix vlc_stream_Peek() read into an unsigned value

We need to check errors in vlc_stream_Peek() calls.

- - - - -
5aebff10 by Steve Lhomme at 2025-12-16T07:13:09+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.

- - - - -


3 changed files:

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


Changes:

=====================================
modules/access/bluray.c
=====================================
@@ -637,7 +637,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
=====================================
@@ -369,7 +369,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
=====================================
@@ -620,7 +620,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/9106f00f9008fde5deae21671e3c7c41c8ab77a5...5aebff101357c14f659c9647d03d9e6a41a8ccc2

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9106f00f9008fde5deae21671e3c7c41c8ab77a5...5aebff101357c14f659c9647d03d9e6a41a8ccc2
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