[vlc-commits] [Git][videolan/vlc][master] libavi: fix hang with zerosized strd chunks
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Jan 24 14:57:33 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
877450dc by Jonas Dittrich at 2024-01-24T11:42:23+00:00
libavi: fix hang with zerosized strd chunks
The fourcc and length needs to be skipped on empty strd chunks, otherwise the stream is not advanced, resulting in a hang.
- - - - -
1 changed file:
- modules/demux/avi/libavi.c
Changes:
=====================================
modules/demux/avi/libavi.c
=====================================
@@ -582,13 +582,13 @@ static void AVI_ChunkFree_strf( avi_chunk_t *p_chk )
static int AVI_ChunkRead_strd( stream_t *s, avi_chunk_t *p_chk )
{
+ AVI_READCHUNK_ENTER;
if ( p_chk->common.i_chunk_size == 0 )
{
msg_Dbg( s, "Zero sized pre-JUNK section met" );
- return AVI_ZEROSIZED_CHUNK;
+ AVI_READCHUNK_EXIT(AVI_ZEROSIZED_CHUNK);
}
- AVI_READCHUNK_ENTER;
p_chk->strd.p_data = malloc( p_chk->common.i_chunk_size );
if( p_chk->strd.p_data )
memcpy( p_chk->strd.p_data, p_buff + 8, p_chk->common.i_chunk_size );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/877450dc625056745a844b001346cc6c181bee79
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/877450dc625056745a844b001346cc6c181bee79
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