[vlc-commits] [Git][videolan/vlc][master] 3 commits: g64: check ops->release

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Nov 23 09:34:57 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
6479137f by Thomas Guillem at 2024-11-23T08:47:16+00:00
g64: check ops->release

Currently, all rtp modules use it but this ops is not mandatory.

- - - - -
fe326fff by Thomas Guillem at 2024-11-23T08:47:16+00:00
g64: fix peek size

version is at offset 26

It was not crashing because the stream-filter/access/extractor was
likely reading more than 7.

- - - - -
6e5f397c by Thomas Guillem at 2024-11-23T08:47:16+00:00
g64: fix leak in case of error

- - - - -


1 changed file:

- modules/demux/g64rtp.c


Changes:

=====================================
modules/demux/g64rtp.c
=====================================
@@ -288,7 +288,7 @@ static int parse_file_header( stream_t *s, char **ppsz_title )
     uint8_t prevoffset[4];
     char *psz_title = NULL, **pp_meta = &psz_title;
 
-    if( vlc_stream_Peek( s, &p_peek, 7 ) != 7 ||
+    if( vlc_stream_Peek( s, &p_peek, 27 ) != 27 ||
         memcmp( p_peek, "Genetec", 7 ) )
         return VLC_EGENERIC;
 
@@ -451,7 +451,8 @@ static struct vlc_rtp_es *g64_rtp_mux_request( struct vlc_rtp_pt *pt,
 static void g64_rtp_pt_clear( struct vlc_rtp_pt *pt, void **pptriv )
 {
     vlc_rtp_pt_end( pt, *pptriv );
-    pt->ops->release( pt );
+    if (pt->ops->release != NULL)
+        pt->ops->release( pt );
     *pptriv = NULL;
 }
 
@@ -828,7 +829,10 @@ static int Open( vlc_object_t * p_this )
     const uint8_t *p_peek;
     if( vlc_stream_Peek( p_demux->s, &p_peek, G64_WRAP_HEADER_BYTES + 6 ) !=
         G64_WRAP_HEADER_BYTES + 6 )
+    {
+        free( psz_title );
         return VLC_EGENERIC;
+    }
 
     switch( p_peek[G64_WRAP_HEADER_BYTES + 1] )
     {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2edddb01da361d1040736d7fda637e118ea6aee1...6e5f397cf6d48ddbd9cd6cabcc559872cab9341b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2edddb01da361d1040736d7fda637e118ea6aee1...6e5f397cf6d48ddbd9cd6cabcc559872cab9341b
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