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>2019-05-10 00:49:41 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-06-04 14:06:41 +0300
commitcdd886a286fb7d55a7d525ec479b49284b7f8b44 (patch)
tree82a3a85781eaff3426e11393fb07b355849f55a8 /libavcodec/arbc.c
parent3d14663f8345a84613b1ec041fd65e4a90057320 (diff)
avcodec/arbc: Skip tiles in fill_tileX() which are completely outside
Fixes: signed integer overflow: 2052526848 + 147237888 cannot be represented in type 'int' Fixes: 14441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5717632944177152 Fixes: 14453/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5739679254577152 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/arbc.c')
-rw-r--r--libavcodec/arbc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/arbc.c b/libavcodec/arbc.c
index bce4a4c96d..06970f140b 100644
--- a/libavcodec/arbc.c
+++ b/libavcodec/arbc.c
@@ -94,6 +94,9 @@ static int fill_tileX(AVCodecContext *avctx, int tile_width, int tile_height,
int start_y = y * tile_height, start_x = x * tile_width;
int end_y = start_y + tile_height, end_x = start_x + tile_width;
+ if (start_x >= avctx->width || start_y >= avctx->height)
+ continue;
+
for (int j = start_y; j < end_y; j += step_h) {
for (int k = start_x; k < end_x; k += step_w) {
if (mask & 0x8000U) {