Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-21 21:46:16 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-28 04:07:02 +0300
commitfe8c9420dd5bbc7a0c545e479da9118bcf311dd2 (patch)
tree1a78171be10b92c807c3f991b8f9289ebaf8e362 /libavcodec/aacps.c
parent15bd309af8302661838150de1905acc4df386d19 (diff)
avcodec/aacps: Check border_position to be monotone
Fixes: runtime error: left shift of negative value -67108864 Fixes: 1738/clusterfuzz-testcase-minimized-6734814327603200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/aacps.c')
-rw-r--r--libavcodec/aacps.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c
index 48b595adbd..31e072dd49 100644
--- a/libavcodec/aacps.c
+++ b/libavcodec/aacps.c
@@ -196,8 +196,13 @@ int AAC_RENAME(ff_ps_read_data)(AVCodecContext *avctx, GetBitContext *gb_host, P
ps->border_position[0] = -1;
if (ps->frame_class) {
- for (e = 1; e <= ps->num_env; e++)
+ for (e = 1; e <= ps->num_env; e++) {
ps->border_position[e] = get_bits(gb, 5);
+ if (ps->border_position[e] < ps->border_position[e-1]) {
+ av_log(avctx, AV_LOG_ERROR, "border_position non monotone.\n");
+ goto err;
+ }
+ }
} else
for (e = 1; e <= ps->num_env; e++)
ps->border_position[e] = (e * numQMFSlots >> ff_log2_tab[ps->num_env]) - 1;