Commit f3599e8f authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ogg: fix use after free

cid #1191891
parent 9839f126
...@@ -2488,8 +2488,10 @@ static void Ogg_DecodeVorbisHeader( logical_stream_t *p_stream, ...@@ -2488,8 +2488,10 @@ static void Ogg_DecodeVorbisHeader( logical_stream_t *p_stream,
p_stream->special.vorbis.p_comment = malloc( sizeof(vorbis_comment) ); p_stream->special.vorbis.p_comment = malloc( sizeof(vorbis_comment) );
if ( !p_stream->special.vorbis.p_info || !p_stream->special.vorbis.p_comment ) if ( !p_stream->special.vorbis.p_info || !p_stream->special.vorbis.p_comment )
{ {
free( p_stream->special.vorbis.p_info ); FREENULL( p_stream->special.vorbis.p_info );
free( p_stream->special.vorbis.p_comment ); FREENULL( p_stream->special.vorbis.p_comment );
p_stream->special.vorbis.b_invalid = true;
break;
} }
vorbis_info_init( p_stream->special.vorbis.p_info ); vorbis_info_init( p_stream->special.vorbis.p_info );
vorbis_comment_init( p_stream->special.vorbis.p_comment ); vorbis_comment_init( p_stream->special.vorbis.p_comment );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment