[vlc-commits] [Git][videolan/vlc][master] 2 commits: mux: ogg: fix leaks on allocation error

Tristan Matthews (@tmatth) gitlab at videolan.org
Tue Sep 30 22:26:50 UTC 2025



Tristan Matthews pushed to branch master at VideoLAN / VLC


Commits:
4c1c0fe3 by Tristan Matthews at 2025-09-30T22:12:04+00:00
mux: ogg: fix leaks on allocation error

Fixes CID 1665606 and CID 1665621.

- - - - -
c5c91652 by Tristan Matthews at 2025-09-30T22:12:04+00:00
mux: ogg: fix overflow before widen

Fixes CID 1439601

- - - - -


1 changed file:

- modules/mux/ogg.c


Changes:

=====================================
modules/mux/ogg.c
=====================================
@@ -815,7 +815,13 @@ static void OggGetSkeletonFisbone( uint8_t **pp_buffer, long *pi_size,
     }
 
     *pp_buffer = calloc( FISBONE_BASE_SIZE + headers.i_size, 1 );
-    if ( !*pp_buffer ) return;
+    if ( unlikely( *pp_buffer == NULL ) )
+    {
+        free( headers.psz_content_type );
+        free( headers.psz_role );
+        return;
+    }
+
     p_buffer = *pp_buffer;
 
     memcpy( p_buffer, "fisbone", 8 );
@@ -1656,7 +1662,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input, block_t *p_data )
 
                 /* presentation time */
                 i_time = vlc_tick_from_samples( (p_stream->i_num_frames - 1 ) *
-                        p_stream->fmt.video.i_frame_rate_base,
+                        (int64_t) p_stream->fmt.video.i_frame_rate_base,
                         p_stream->fmt.video.i_frame_rate );
                 AddIndexEntry( p_mux, i_time, p_input );
             }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1327a621feed33b5156bcbea701c1023355d5931...c5c916524f33b3313bcf879a012480304f30f38f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1327a621feed33b5156bcbea701c1023355d5931...c5c916524f33b3313bcf879a012480304f30f38f
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