[FFmpeg-cvslog] motionpixels: Prevent calling init_vlc() with invalid parameters
Laurent Aimar
git at videolan.org
Sat Oct 8 03:47:31 CEST 2011
ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Sep 29 03:12:07 2011 +0000| [1cd0a5516396bd6fb54e4df1e7c88ed18416299b] | committer: Janne Grunau
motionpixels: Prevent calling init_vlc() with invalid parameters
Signed-off-by: Janne Grunau <janne-libav at jannau.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1cd0a5516396bd6fb54e4df1e7c88ed18416299b
---
libavcodec/motionpixels.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index 1564ea1..d054e00 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -281,6 +281,8 @@ static int mp_decode_frame(AVCodecContext *avctx,
if (sz == 0)
goto end;
+ if (mp->max_codes_bits <= 0)
+ goto end;
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);
More information about the ffmpeg-cvslog
mailing list