[FFmpeg-cvslog] motionpixels: Prevent calling init_vlc() with invalid parameters
Laurent Aimar
git at videolan.org
Mon Mar 19 05:30:29 CET 2012
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Thu Sep 29 03:12:07 2011 +0000| [5fa8e43b547859fe0963c127e67832789564bf1e] | committer: Reinhard Tartler
motionpixels: Prevent calling init_vlc() with invalid parameters
Signed-off-by: Janne Grunau <janne-libav at jannau.net>
(cherry picked from commit 1cd0a5516396bd6fb54e4df1e7c88ed18416299b)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5fa8e43b547859fe0963c127e67832789564bf1e
---
libavcodec/motionpixels.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index cee21d3..23433a1 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