projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f05cf4
)
motionpixels: Prevent calling init_vlc() with invalid parameters
author
Laurent Aimar
<fenrir@videolan.org>
Thu, 29 Sep 2011 03:12:07 +0000
(
03:12
+0000)
committer
Janne Grunau
<janne-libav@jannau.net>
Fri, 7 Oct 2011 14:25:32 +0000
(16:25 +0200)
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
libavcodec/motionpixels.c
patch
|
blob
|
history
diff --git
a/libavcodec/motionpixels.c
b/libavcodec/motionpixels.c
index
1564ea1
..
d054e00
100644
(file)
--- 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);