[vlc-commits] [Git][videolan/vlc][master] 2 commits: speex: fix leak on allocation failure
Tristan Matthews (@tmatth)
gitlab at videolan.org
Sat Sep 27 20:06:37 UTC 2025
Tristan Matthews pushed to branch master at VideoLAN / VLC
Commits:
defb38ea by Tristan Matthews at 2025-09-27T19:51:27+00:00
speex: fix leak on allocation failure
Fixes CID 1666162
- - - - -
250fcee5 by Tristan Matthews at 2025-09-27T19:51:27+00:00
speex: cosmetic cleanup
- - - - -
1 changed file:
- modules/codec/speex.c
Changes:
=====================================
modules/codec/speex.c
=====================================
@@ -632,8 +632,8 @@ static block_t *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
if ( i_bits_after > 7 )
{
/* round-down since we rounded-up earlier (to include
- * the speex terminator code.
- */
+ * the speex terminator code.
+ */
i_bytes_in_speex_frame--;
speex_bits_write( &p_sys->bits,
(char*)p_block->p_buffer,
@@ -643,7 +643,10 @@ static block_t *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
0,
p_block->i_buffer-i_bytes_in_speex_frame );
if( unlikely(p_block == NULL) )
+ {
+ block_Release( p_new_block );
return NULL;
+ }
*pp_block = p_block;
}
@@ -657,7 +660,7 @@ static block_t *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
}
else
{
- return SendPacket( p_dec, p_block );
+ return SendPacket( p_dec, p_block );
}
}
else
@@ -901,7 +904,6 @@ static void ParseSpeexComments( decoder_t *p_dec, ogg_packet *p_oggpacket )
return;
}
- /* */
char *psz_mode;
if( asprintf( &psz_mode, "%s%s", p_mode->modeName, p_sys->p_header->vbr ? " VBR" : "" ) >= 0 )
{
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/768f6df5fca6d69212b292be2050ec35369def34...250fcee5cd97f92ee8a2782abc4170c6815435b6
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/768f6df5fca6d69212b292be2050ec35369def34...250fcee5cd97f92ee8a2782abc4170c6815435b6
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