X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Farbc.c;h=06970f140b048afcfbb45ac0dfc8cbfc579ef659;hb=e5bcda6473a2d6984216004506374669501fcf3b;hp=bce4a4c96d19f6ff185e530887b2f1125286c558;hpb=67d466d09b105b2b1d3d8da4c21d8975925741ae;p=ffmpeg diff --git a/libavcodec/arbc.c b/libavcodec/arbc.c index bce4a4c96d1..06970f140b0 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) {