[FFmpeg-cvslog] avcodec/wmalosslessdec: deallocate uninitialized frame on decode_tilehdr() failure

Michael Niedermayer git at videolan.org
Sat Jan 11 02:24:22 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 11 01:59:20 2014 +0100| [ae3856dcaf9c5ef339969c95a72bcaf7c4bba9ec] | committer: Michael Niedermayer

avcodec/wmalosslessdec: deallocate uninitialized frame on decode_tilehdr() failure

Fixes use of uninitialized memory
partly fixes: msan_uninit-mem_7f7834b6a530_6473_luckynight-partial.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae3856dcaf9c5ef339969c95a72bcaf7c4bba9ec
---

 libavcodec/wmalosslessdec.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 6e5100d..8a08f5a 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -1040,6 +1040,7 @@ static int decode_frame(WmallDecodeCtx *s)
     /* decode tile information */
     if ((ret = decode_tilehdr(s))) {
         s->packet_loss = 1;
+        av_frame_unref(s->frame);
         return ret;
     }
 



More information about the ffmpeg-cvslog mailing list