[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: mp4: read the box size as ssize_t

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Aug 28 14:46:03 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
20beb897 by Steve Lhomme at 2025-08-28T14:30:55+00:00
demux: mp4: read the box size as ssize_t

- - - - -
7da99aa8 by Steve Lhomme at 2025-08-28T14:30:55+00:00
demux: mp4: don't store the iinf peek size

So we can't mess with the type.

- - - - -


1 changed file:

- modules/demux/mp4/libmp4.c


Changes:

=====================================
modules/demux/mp4/libmp4.c
=====================================
@@ -340,7 +340,7 @@ MP4_Box_t * MP4_BoxExtract( MP4_Box_t **pp_chain, uint32_t i_type )
  *****************************************************************************/
 static int MP4_PeekBoxHeader( stream_t *p_stream, MP4_Box_t *p_box )
 {
-    int      i_read;
+    ssize_t i_read;
     const uint8_t  *p_peek;
 
     if( ( ( i_read = vlc_stream_Peek( p_stream, &p_peek, 32 ) ) < 8 ) )
@@ -4731,8 +4731,7 @@ static int MP4_ReadBox_iloc( stream_t *p_stream, MP4_Box_t *p_box )
 static int MP4_ReadBox_iinf( stream_t *p_stream, MP4_Box_t *p_box )
 {
     const uint8_t *p_versionpeek;
-    size_t i_peek = vlc_stream_Peek( p_stream, &p_versionpeek, 9 );
-    if( i_peek < 9 )
+    if( vlc_stream_Peek( p_stream, &p_versionpeek, 9 ) < 9 )
         return 0;
 
     size_t i_header = 12 + (( p_versionpeek[8] == 0 ) ? 2 : 4);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a64451e05b9bdd5b30a7ec43f9a8d5d361120f9b...7da99aa82a16ae65fab9ef78de60bb3dc816d09b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a64451e05b9bdd5b30a7ec43f9a8d5d361120f9b...7da99aa82a16ae65fab9ef78de60bb3dc816d09b
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