[vlc-commits] [Git][videolan/vlc][master] demux: mp4: add a sanity check for large movie scale values

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Fri Aug 15 11:34:13 UTC 2025



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
0ad660d9 by Steve Lhomme at 2025-08-15T11:10:59+00:00
demux: mp4: add a sanity check for large movie scale values

0x10000000 ought to be enough for anybody.

Fixes https://code.videolan.org/videolan/vlc/-/issues/28997

- - - - -


1 changed file:

- modules/demux/mp4/mp4.c


Changes:

=====================================
modules/demux/mp4/mp4.c
=====================================
@@ -1229,9 +1229,9 @@ static int Open( vlc_object_t * p_this )
     else
     {
         p_sys->i_timescale = BOXDATA(p_mvhd)->i_timescale;
-        if( p_sys->i_timescale == 0 )
+        if( p_sys->i_timescale == 0 || p_sys->i_timescale > 0x10000000 )
         {
-            msg_Err( p_this, "bad timescale" );
+            msg_Err( p_this, "bad timescale %" PRIu32, p_sys->i_timescale );
             goto error;
         }
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0ad660d9f8a2ae388af9b6cbf82bddb7acf5c53b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0ad660d9f8a2ae388af9b6cbf82bddb7acf5c53b
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