[vlc-commits] demux: avi: fix invalid deref

Francois Cartegnie git at videolan.org
Tue Dec 15 11:52:29 UTC 2020


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Nov  9 10:30:59 2020 +0100| [0660acc3ab64d2c3ad99cae887a438f0648faa72] | committer: Hugo Beauzée-Luyssen

demux: avi: fix invalid deref

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
(cherry picked from commit 16504feba9aa9ea946dc711eed113943f5285f05)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=0660acc3ab64d2c3ad99cae887a438f0648faa72
---

 modules/demux/avi/avi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 7868a0f90e..ee31340bb6 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -3003,7 +3003,8 @@ static void AVI_ExtractSubtitle( demux_t *p_demux,
             p_indx->i_entriesinuse > 0 )
         {
             if( vlc_stream_Seek( p_demux->s, p_indx->idx.super[0].i_offset ) ||
-                AVI_ChunkRead( p_demux->s, &ck, NULL  ) )
+                AVI_ChunkRead( p_demux->s, &ck, NULL  ) ||
+                ck.common.i_chunk_fourcc != AVIFOURCC_indx )
                 goto exit;
             p_indx = &ck.indx;
         }



More information about the vlc-commits mailing list