diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-01 20:42:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-01 22:20:16 +0200 |
commit | adb4854aac1767307aa422ae9f5d8fa1ff27c718 (patch) | |
tree | 2ab030e3276e6a9b1cd3118e172ecdd259e37b3f | |
parent | 8b3e580b7f436206e84dac89415e057fa9abdab8 (diff) | |
download | ffmpeg-adb4854aac1767307aa422ae9f5d8fa1ff27c718.tar.gz |
avcodec/asvdec: Use rounded up dimenensions in input size check
Fixes: Timeout
Fixes: 2001/clusterfuzz-testcase-minimized-6187599389523968
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/asvdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c index 467e2554ca..9a11446f52 100644 --- a/libavcodec/asvdec.c +++ b/libavcodec/asvdec.c @@ -210,7 +210,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVFrame *const p = data; int mb_x, mb_y, ret; - if (buf_size * 8LL < a->mb_height2 * a->mb_width2 * 13LL) + if (buf_size * 8LL < a->mb_height * a->mb_width * 13LL) return AVERROR_INVALIDDATA; if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |