[FFmpeg-cvslog] Fixed deference of NULL pointer in motionpixels decoder.

Laurent Aimar git at videolan.org
Thu Nov 3 03:57:38 CET 2011


ffmpeg | branch: release/0.5 | Laurent Aimar <fenrir at videolan.org> | Sat Sep 10 13:28:13 2011 +0200| [cc885682e361a5da269cd371c51224b9d5f8104f] | committer: Michael Niedermayer

Fixed deference of NULL pointer in motionpixels decoder.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 824f98f442996eaee9204b132752cf5114fc94cf)

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

 libavcodec/motionpixels.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index f69dcf9..2839d07 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -325,7 +325,8 @@ static int mp_decode_frame(AVCodecContext *avctx,
     if (sz == 0)
         goto end;
 
-    init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0);
+    if (init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0))
+        goto end;
     mp_decode_frame_helper(mp, &gb);
     free_vlc(&mp->vlc);
 



More information about the ffmpeg-cvslog mailing list