Browse Source

visual: fix potential use-after-free

p_outpic is used to modify b_progressive before it is checked to be
non-null.
pull/141/head
Alexandre Janniaux 4 years ago
committed by Steve Lhomme
parent
commit
d1b78570e4
  1. 2
      modules/visualization/visual/visual.c

2
modules/visualization/visual/visual.c

@ -340,9 +340,9 @@ static block_t *DoRealWork( filter_t *p_filter, block_t *p_in_buf )
/* First, get a new picture */
picture_t *p_outpic = vout_GetPicture( p_sys->p_vout );
p_outpic->b_progressive = true;
if( unlikely(p_outpic == NULL) )
return p_in_buf;
p_outpic->b_progressive = true;
/* Blank the picture */
for( int i = 0 ; i < p_outpic->i_planes ; i++ )

Loading…
Cancel
Save