Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
8e209b17 by Steve Lhomme at 2026-05-16T16:04:40+00:00
demux: mkv: avoid potential constant overflow

We never use this code to start reading an EBML/Matroska stream but better safe
than sorry.

CID #1692707

- - - - -


1 changed file:

- modules/demux/mkv/Ebml_parser.cpp


Changes:

=====================================
modules/demux/mkv/Ebml_parser.cpp
=====================================
@@ -228,7 +228,7 @@ next:
         // If the parent is a segment, use the segment context when creating 
children
         // (to prolong their lifetime), otherwise just continue as normal
         EbmlSemanticContext e_context =
-                EBML_CTX_MASTER( EBML_CONTEXT(m_el[mi_level - 1]) ) == 
EBML_CTX_MASTER( Context_KaxSegmentVLC )
+                (mi_level == 0 || EBML_CTX_MASTER( EBML_CONTEXT(m_el[mi_level 
- 1]) ) == EBML_CTX_MASTER( Context_KaxSegmentVLC ))
                 ? Context_KaxSegmentVLC
                 : EBML_CONTEXT(m_el[mi_level - 1]);
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/8e209b172e3d53503e45294d525cd2b287a62bb2

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


_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to