[vlc-commits] demux: ogg: fix use after free
Francois Cartegnie
git at videolan.org
Wed Mar 12 17:19:58 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Mar 12 17:19:09 2014 +0100| [f3599e8f2395705782bbec65a9f13363c4b7e77d] | committer: Francois Cartegnie
demux: ogg: fix use after free
cid #1191891
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3599e8f2395705782bbec65a9f13363c4b7e77d
---
modules/demux/ogg.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 840b60d..8806f58 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -2488,8 +2488,10 @@ static void Ogg_DecodeVorbisHeader( logical_stream_t *p_stream,
p_stream->special.vorbis.p_comment = malloc( sizeof(vorbis_comment) );
if ( !p_stream->special.vorbis.p_info || !p_stream->special.vorbis.p_comment )
{
- free( p_stream->special.vorbis.p_info );
- free( p_stream->special.vorbis.p_comment );
+ FREENULL( p_stream->special.vorbis.p_info );
+ 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_comment_init( p_stream->special.vorbis.p_comment );
More information about the vlc-commits
mailing list