[vlc-commits] [Git][videolan/vlc][master] ttml: fix null deref on empty namespace uri

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Mar 24 06:08:04 UTC 2025



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


Commits:
d16c6187 by François Cartegnie at 2025-03-24T05:43:28+00:00
ttml: fix null deref on empty namespace uri

refs #29053
resf #29055
regression by 44879313bab5b7208b12cb4968cf03a6f521e531

ttml: fix null deref on empty uri

- - - - -


2 changed files:

- modules/codec/ttml/ttml.c
- modules/demux/ttml.c


Changes:

=====================================
modules/codec/ttml/ttml.c
=====================================
@@ -129,7 +129,7 @@ const char * tt_namespaces_GetPrefix( const tt_namespaces_t *nss,
 void tt_namespaces_Register( tt_namespaces_t *nss, const char *psz_prefix,
                              const char *psz_uri )
 {
-    if( tt_namespaces_GetPrefix( nss, psz_uri ) )
+    if( !psz_uri || tt_namespaces_GetPrefix( nss, psz_uri ) )
         return;
     struct tt_namespace_s *ns = malloc(sizeof(*ns));
     if( ns )


=====================================
modules/demux/ttml.c
=====================================
@@ -174,7 +174,7 @@ static int ReadTTML( demux_t* p_demux )
                 break;
 
             case XML_READER_STARTELEM:
-                if( strcmp( psz_node_namespace, TT_NS ) ||
+                if( (psz_node_namespace && strcmp( psz_node_namespace, TT_NS )) ||
                     strcmp( tt_LocalName( psz_node_name ), "tt" ) ||
                     p_sys->p_rootnode != NULL )
                     return VLC_EGENERIC;



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

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