[vlc-commits] [Git][videolan/vlc][master] demux: ts: fix opus read limits

François Cartegnie (@fcartegnie) gitlab at videolan.org
Mon Aug 31 15:37:15 UTC 2026



François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
2b3db140 by François Cartegnie at 2026-08-31T15:33:09+02:00
demux: ts: fix opus read limits

fix #29681

- - - - -


1 changed file:

- modules/demux/mpeg/ts.c


Changes:

=====================================
modules/demux/mpeg/ts.c
=====================================
@@ -62,6 +62,7 @@
 #endif
 
 #include <assert.h>
+#include <limits.h>
 
 /*****************************************************************************
  * Module descriptor
@@ -1277,11 +1278,16 @@ static block_t *Opus_Parse(demux_t *demux, block_t *block)
         buf += 2;
 
         unsigned au_size = 0;
-        while (len--) {
+        for (;len;len--) {
             int c = *buf++;
             au_size += c;
             if (c != 0xff)
                 break;
+            if (au_size > UINT_MAX/2)
+            {
+                len = 0;
+                break;
+            }
         }
 
         if (start_trim_flag) {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2b3db140b49beba2ceb2cb3dfee47f2f049237c7

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2b3db140b49beba2ceb2cb3dfee47f2f049237c7
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list