Browse Source

libass: fix possible nullptr deref

vlc_stream_MemoryNew may return NULL. Which could be dereferenced
by vlc_stream_ReadLine calls in OldEngineClunkyRollInfoPatch.

Fixes: #29363 (Coverity 1666281)
(cherry picked from commit 0b7831694b)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3.0.x
Khalid Masum 10 months ago
committed by Jean-Baptiste Kempf
parent
commit
18ab3e56f0
  1. 3
      modules/codec/libass.c

3
modules/codec/libass.c

@ -775,6 +775,9 @@ static void OldEngineClunkyRollInfoPatch( decoder_t *p_dec, ASS_Track *p_track )
stream_t *p_memstream = vlc_stream_MemoryNew( p_dec, p_dec->fmt_in.p_extra,
p_dec->fmt_in.i_extra, true );
if (unlikely(!p_memstream))
return;
char *s = vlc_stream_ReadLine( p_memstream );
unsigned playres[2] = {0, 0};
bool b_hotfix = false;

Loading…
Cancel
Save