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:
ddb2dd7
)
avcodec/lagarith: Check scale_factor
author
Michael Niedermayer
<michael@niedermayer.cc>
Tue, 9 May 2017 22:56:45 +0000
(
00:56
+0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Tue, 9 May 2017 23:10:55 +0000
(
01:10
+0200)
Fixes: 1425/clusterfuzz-testcase-minimized-
6295712339853312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/lagarith.c
patch
|
blob
|
history
diff --git
a/libavcodec/lagarith.c
b/libavcodec/lagarith.c
index
0444977
..
1f4afc5
100644
(file)
--- a/
libavcodec/lagarith.c
+++ b/
libavcodec/lagarith.c
@@
-191,7
+191,9
@@
static int lag_read_prob_header(lag_rac *rac, GetBitContext *gb)
}
scale_factor++;
- cumulative_target = 1 << scale_factor;
+ if (scale_factor >= 32U)
+ return AVERROR_INVALIDDATA;
+ cumulative_target = 1U << scale_factor;
if (scaled_cumul_prob > cumulative_target) {
av_log(rac->avctx, AV_LOG_ERROR,