summaryrefslogtreecommitdiff
path: root/libavcodec/arbc.c
diff options
context:
space:
mode:
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) {