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)
pull/188/head
Khalid Masum 10 months ago
committed by Steve Lhomme
parent
commit
0b7831694b
  1. 3
      modules/codec/libass.c

3
modules/codec/libass.c

@ -764,6 +764,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