OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b516f1
)
motionpixels: clip VLC codes.
author
Anton Khirnov
<anton@khirnov.net>
Fri, 15 Nov 2013 14:33:20 +0000
(15:33 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Thu, 21 Nov 2013 19:57:20 +0000
(20:57 +0100)
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
libavcodec/motionpixels.c
patch
|
blob
|
history
diff --git
a/libavcodec/motionpixels.c
b/libavcodec/motionpixels.c
index
8e7b3a4
..
6c1efad
100644
(file)
--- a/
libavcodec/motionpixels.c
+++ b/
libavcodec/motionpixels.c
@@
-180,6
+180,7
@@
static int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *gb)
int i;
i = (mp->codes_count == 1) ? 0 : get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1);
+ i = FFMIN(i, FF_ARRAY_ELEMS(mp->codes) - 1);
return mp->codes[i].delta;
}