libavcodec/ffv1.c:1455: error: Buffer Overrun L2
  Offset: [1, 3] (⇐ [0, 2] + 1) Size: 3 by call to `decode_line`.

libavcodec/ffv1.c:1432:1: Array declaration
1430. }
1431. 
1432. static void decode_rgb_frame(FFV1Context *s, uint32_t *src,
      ^
1433.                              int w, int h, int stride)
1434. {

libavcodec/ffv1.c:1455:13: Call
1453.             sample[p][1][-1] = sample[p][0][0];
1454.             sample[p][0][w]  = sample[p][0][w - 1];
1455.             decode_line(s, w, sample[p], FFMIN(p, 1), 9);
                  ^
1456.         }
1457.         for (x = 0; x < w; x++) {

libavcodec/ffv1.c:1324:1: <Length trace>
1322. }
1323. 
1324. static av_always_inline void decode_line(FFV1Context *s, int w,
      ^
1325.                                          int16_t *sample[2],
1326.                                          int plane_index, int bits)

libavcodec/ffv1.c:1324:1: Parameter `*sample`
  1322. }
  1323. 
  1324. static av_always_inline void decode_line(FFV1Context *s, int w,
        ^
  1325.                                          int16_t *sample[2],
  1326.                                          int plane_index, int bits)

libavcodec/ffv1.c:1389:9: Array access: Offset: [1, 3] (⇐ [0, 2] + 1) Size: 3 by call to `decode_line` 
  1387.             diff = -diff;
  1388. 
  1389.         sample[1][x] = (predict(sample[1] + x, sample[0] + x) + diff) &
                ^
  1390.                        ((1 << bits) - 1);
  1391.     }

static av_always_inline void decode_line(FFV1Context *s, int w,
                                         int16_t *sample[2],
                                         int plane_index, int bits)
{
    PlaneContext *const p = &s->plane[plane_index];
    RangeCoder *const c   = &s->c;
    int x;
    int run_count = 0;
    int run_mode  = 0;
    int run_index = s->run_index;
    for (x = 0; x < w; x++) {
        int diff, context, sign;
        context = get_context(p, sample[1] + x, sample[0] + x, sample[1] + x);
        if (context < 0) {
            context = -context;
            sign    = 1;
        } else
            sign = 0;
        av_assert2(context < p->context_count);
        if (s->ac) {
            diff = get_symbol_inline(c, p->state[context], 1);
        } else {
            if (context == 0 && run_mode == 0)
                run_mode = 1;
            if (run_mode) {
                if (run_count == 0 && run_mode == 1) {
                    if (get_bits1(&s->gb)) {
                        run_count = 1 << ff_log2_run[run_index];
                        if (x + run_count <= w)
                            run_index++;
                    } else {
                        if (ff_log2_run[run_index])
                            run_count = get_bits(&s->gb, ff_log2_run[run_index]);
                        else
                            run_count = 0;
                        if (run_index)
                            run_index--;
                        run_mode = 2;
                    }
                }
                run_count--;
                if (run_count < 0) {
                    run_mode  = 0;
                    run_count = 0;
                    diff      = get_vlc_symbol(&s->gb, &p->vlc_state[context],
                                               bits);
                    if (diff >= 0)
                        diff++;
                } else
                    diff = 0;
            } else
                diff = get_vlc_symbol(&s->gb, &p->vlc_state[context], bits);
            av_dlog(s->avctx, "count:%d index:%d, mode:%d, x:%d pos:%d\n",
                    run_count, run_index, run_mode, x, get_bits_count(&s->gb));
        }
        if (sign)
            diff = -diff;
        sample[1][x] = (predict(sample[1] + x, sample[0] + x) + diff) &
                       ((1 << bits) - 1);
    }
    s->run_index = run_index;
}
['static void decode_rgb_frame(FFV1Context *s, uint32_t *src,\n                             int w, int h, int stride)\n{\n    int x, y, p;\n    int16_t *sample[3][2];\n    for (x = 0; x < 3; x++) {\n        sample[x][0] = s->sample_buffer +  x * 2      * (w + 6) + 3;\n        sample[x][1] = s->sample_buffer + (x * 2 + 1) * (w + 6) + 3;\n    }\n    s->run_index = 0;\n    memset(s->sample_buffer, 0, 6 * (w + 6) * sizeof(*s->sample_buffer));\n    for (y = 0; y < h; y++) {\n        for (p = 0; p < 3; p++) {\n            int16_t *temp = sample[p][0];\n            sample[p][0] = sample[p][1];\n            sample[p][1] = temp;\n            sample[p][1][-1] = sample[p][0][0];\n            sample[p][0][w]  = sample[p][0][w - 1];\n            decode_line(s, w, sample[p], FFMIN(p, 1), 9);\n        }\n        for (x = 0; x < w; x++) {\n            int g = sample[0][1][x];\n            int b = sample[1][1][x];\n            int r = sample[2][1][x];\n            b -= 0x100;\n            r -= 0x100;\n            g -= (b + r) >> 2;\n            b += g;\n            r += g;\n            src[x + stride * y] = b + (g << 8) + (r << 16) + (0xFF << 24);\n        }\n    }\n}', 'static av_always_inline void decode_line(FFV1Context *s, int w,\n                                         int16_t *sample[2],\n                                         int plane_index, int bits)\n{\n    PlaneContext *const p = &s->plane[plane_index];\n    RangeCoder *const c   = &s->c;\n    int x;\n    int run_count = 0;\n    int run_mode  = 0;\n    int run_index = s->run_index;\n    for (x = 0; x < w; x++) {\n        int diff, context, sign;\n        context = get_context(p, sample[1] + x, sample[0] + x, sample[1] + x);\n        if (context < 0) {\n            context = -context;\n            sign    = 1;\n        } else\n            sign = 0;\n        av_assert2(context < p->context_count);\n        if (s->ac) {\n            diff = get_symbol_inline(c, p->state[context], 1);\n        } else {\n            if (context == 0 && run_mode == 0)\n                run_mode = 1;\n            if (run_mode) {\n                if (run_count == 0 && run_mode == 1) {\n                    if (get_bits1(&s->gb)) {\n                        run_count = 1 << ff_log2_run[run_index];\n                        if (x + run_count <= w)\n                            run_index++;\n                    } else {\n                        if (ff_log2_run[run_index])\n                            run_count = get_bits(&s->gb, ff_log2_run[run_index]);\n                        else\n                            run_count = 0;\n                        if (run_index)\n                            run_index--;\n                        run_mode = 2;\n                    }\n                }\n                run_count--;\n                if (run_count < 0) {\n                    run_mode  = 0;\n                    run_count = 0;\n                    diff      = get_vlc_symbol(&s->gb, &p->vlc_state[context],\n                                               bits);\n                    if (diff >= 0)\n                        diff++;\n                } else\n                    diff = 0;\n            } else\n                diff = get_vlc_symbol(&s->gb, &p->vlc_state[context], bits);\n            av_dlog(s->avctx, "count:%d index:%d, mode:%d, x:%d pos:%d\\n",\n                    run_count, run_index, run_mode, x, get_bits_count(&s->gb));\n        }\n        if (sign)\n            diff = -diff;\n        sample[1][x] = (predict(sample[1] + x, sample[0] + x) + diff) &\n                       ((1 << bits) - 1);\n    }\n    s->run_index = run_index;\n}']