Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
34f59e06 by Jonas Dittrich at 2026-06-15T09:30:25+02: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.

(cherry picked from commit 877450dc625056745a844b001346cc6c181bee79)
Signed-off-by: Thomas Guillem <[email protected]>

- - - - -


1 changed file:

- modules/demux/avi/libavi.c


Changes:

=====================================
modules/demux/avi/libavi.c
=====================================
@@ -573,13 +573,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( (vlc_object_t*)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/34f59e06ee718cec451917fb91b4ac1de4c11d97

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/34f59e06ee718cec451917fb91b4ac1de4c11d97
You're receiving this email because of your account on code.videolan.org. 
Manage all notifications: https://code.videolan.org/-/profile/notifications | 
Help: https://code.videolan.org/help


_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to