OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ec8685
)
cavsdec: check run value validity
author
Michael Niedermayer
<michaelni@gmx.at>
Thu, 11 Aug 2011 17:55:44 +0000
(19:55 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Thu, 11 Aug 2011 18:16:27 +0000
(20:16 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/cavsdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/cavsdec.c
b/libavcodec/cavsdec.c
index
7beedb8
..
fcfe06e
100644
(file)
--- a/
libavcodec/cavsdec.c
+++ b/
libavcodec/cavsdec.c
@@
-125,6
+125,8
@@
static int decode_residual_block(AVSContext *h, GetBitContext *gb,
level_code = get_ue_code(gb,r->golomb_order);
if(level_code >= ESCAPE_CODE) {
run = ((level_code - ESCAPE_CODE) >> 1) + 1;
+ if(run > 64)
+ return -1;
esc_code = get_ue_code(gb,esc_golomb_order);
level = esc_code + (run > r->max_run ? 1 : r->level_add[run]);
while(level > r->inc_limit)