[FFmpeg-devel] [PATCH]Fix vorbis decoder memlead on corrupt input

Carl Eugen Hoyos cehoyos
Mon Sep 29 20:01:25 CEST 2008


Hi!

I just found this patch in my local tree. AFAIR, it fixes a memleak on 
currupt input (which I cannot find atm).

Is it ok?

Carl Eugen
-------------- next part --------------
Index: libavcodec/vorbis_dec.c
===================================================================
--- libavcodec/vorbis_dec.c	(Revision 15461)
+++ libavcodec/vorbis_dec.c	(Arbeitskopie)
@@ -960,6 +960,7 @@
     hdr_type=get_bits(gb, 8);
     if (hdr_type!=5) {
         av_log(avccontext, AV_LOG_ERROR, "Third header is not the setup header.\n");
+        vorbis_free(vc);
         return -1;
     }
     if (vorbis_parse_setup_hdr(vc)) {



More information about the ffmpeg-devel mailing list