libavcodec/ffv1.c:838: error: Buffer Overrun L2
  Offset: [22, 62] Size: 32 by call to `put_symbol`.

libavcodec/ffv1.c:796:1: Array declaration
794. 
795. #if CONFIG_FFV1_ENCODER
796. static int write_extra_header(FFV1Context *f)
     ^
797. {
798.     RangeCoder *const c = &f->c;

libavcodec/ffv1.c:838:21: Call
836.                 for (k = 0; k < CONTEXT_SIZE; k++) {
837.                     int pred = j ? f->initial_states[i][j - 1][k] : 128;
838.                     put_symbol(c, state2[k],
                         ^
839.                                (int8_t)(f->initial_states[i][j][k] - pred), 1);
840.                 }

libavcodec/ffv1.c:332:1: Parameter `*state`
  330. }
  331. 
  332. static av_noinline void put_symbol(RangeCoder *c, uint8_t *state,
       ^
  333.                                    int v, int is_signed)
  334. {

libavcodec/ffv1.c:335:5: Call
  333.                                    int v, int is_signed)
  334. {
  335.     put_symbol_inline(c, state, v, is_signed, NULL, NULL);
           ^
  336. }
  337. 

libavcodec/ffv1.c:284:1: Parameter `*state`
    282. }
    283. 
    284. static av_always_inline av_flatten void put_symbol_inline(RangeCoder *c,
         ^
    285.                                                           uint8_t *state, int v,
    286.                                                           int is_signed,

libavcodec/ffv1.c:321:17: Call
    319. 
    320.             for (i = e - 1; i >= 0; i--)
    321.                 put_rac(c, state + 22 + FFMIN(i, 9), (a >> i) & 1);  // 22..31
                         ^
    322. 
    323.             if (is_signed)

libavcodec/rangecoder.h:85:1: <Length trace>
83. }
84. 
85. static inline void put_rac(RangeCoder *c, uint8_t *const state, int bit)
    ^
86. {
87.     int range1 = (c->range * (*state)) >> 8;

libavcodec/rangecoder.h:85:1: Parameter `*state`
      83. }
      84. 
      85. static inline void put_rac(RangeCoder *c, uint8_t *const state, int bit)
          ^
      86. {
      87.     int range1 = (c->range * (*state)) >> 8;

libavcodec/rangecoder.h:87:30: Array access: Offset: [22, 62] Size: 32 by call to `put_symbol` 
      85. static inline void put_rac(RangeCoder *c, uint8_t *const state, int bit)
      86. {
      87.     int range1 = (c->range * (*state)) >> 8;
                                       ^
      88. 
      89.     assert(*state);

static inline void put_rac(RangeCoder *c, uint8_t *const state, int bit)
{
    int range1 = (c->range * (*state)) >> 8;
    assert(*state);
    assert(range1 < c->range);
    assert(range1 > 0);
    if (!bit) {
        c->range -= range1;
        *state    = c->zero_state[*state];
    } else {
        c->low  += c->range - range1;
        c->range = range1;
        *state   = c->one_state[*state];
    }
    renorm_encoder(c);
}
['static int write_extra_header(FFV1Context *f)\n{\n    RangeCoder *const c = &f->c;\n    uint8_t state[CONTEXT_SIZE];\n    int i, j, k;\n    uint8_t state2[32][CONTEXT_SIZE];\n    memset(state2, 128, sizeof(state2));\n    memset(state, 128, sizeof(state));\n    f->avctx->extradata = av_malloc(f->avctx->extradata_size = 10000 +\n                                    (11 * 11 * 5 * 5 * 5 + 11 * 11 * 11) * 32);\n    ff_init_range_encoder(c, f->avctx->extradata, f->avctx->extradata_size);\n    ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8);\n    put_symbol(c, state, f->version, 0);\n    put_symbol(c, state, f->ac, 0);\n    if (f->ac > 1)\n        for (i = 1; i < 256; i++)\n            put_symbol(c, state, f->state_transition[i] - c->one_state[i], 1);\n    put_symbol(c, state, f->colorspace, 0);\n    put_symbol(c, state, f->avctx->bits_per_raw_sample, 0);\n    put_rac(c, state, 1);\n    put_symbol(c, state, f->chroma_h_shift, 0);\n    put_symbol(c, state, f->chroma_v_shift, 0);\n    put_rac(c, state, 0);\n    put_symbol(c, state, f->num_h_slices - 1, 0);\n    put_symbol(c, state, f->num_v_slices - 1, 0);\n    put_symbol(c, state, f->quant_table_count, 0);\n    for (i = 0; i < f->quant_table_count; i++)\n        write_quant_tables(c, f->quant_tables[i]);\n    for (i = 0; i < f->quant_table_count; i++) {\n        for (j = 0; j < f->context_count[i] * CONTEXT_SIZE; j++)\n            if (f->initial_states[i] && f->initial_states[i][0][j] != 128)\n                break;\n        if (j < f->context_count[i] * CONTEXT_SIZE) {\n            put_rac(c, state, 1);\n            for (j = 0; j < f->context_count[i]; j++)\n                for (k = 0; k < CONTEXT_SIZE; k++) {\n                    int pred = j ? f->initial_states[i][j - 1][k] : 128;\n                    put_symbol(c, state2[k],\n                               (int8_t)(f->initial_states[i][j][k] - pred), 1);\n                }\n        } else {\n            put_rac(c, state, 0);\n        }\n    }\n    f->avctx->extradata_size = ff_rac_terminate(c);\n    return 0;\n}', 'static av_noinline void put_symbol(RangeCoder *c, uint8_t *state,\n                                   int v, int is_signed)\n{\n    put_symbol_inline(c, state, v, is_signed, NULL, NULL);\n}', 'static av_always_inline av_flatten void put_symbol_inline(RangeCoder *c,\n                                                          uint8_t *state, int v,\n                                                          int is_signed,\n                                                          uint64_t rc_stat[256][2],\n                                                          uint64_t rc_stat2[32][2])\n{\n    int i;\n#define put_rac(C, S, B)                        \\\n    do {                                        \\\n        if (rc_stat) {                          \\\n            rc_stat[*(S)][B]++;                 \\\n            rc_stat2[(S) - state][B]++;         \\\n        }                                       \\\n        put_rac(C, S, B);                       \\\n    } while (0)\n    if (v) {\n        const int a = FFABS(v);\n        const int e = av_log2(a);\n        put_rac(c, state + 0, 0);\n        if (e <= 9) {\n            for (i = 0; i < e; i++)\n                put_rac(c, state + 1 + i, 1);\n            put_rac(c, state + 1 + i, 0);\n            for (i = e - 1; i >= 0; i--)\n                put_rac(c, state + 22 + i, (a >> i) & 1);\n            if (is_signed)\n                put_rac(c, state + 11 + e, v < 0);\n        } else {\n            for (i = 0; i < e; i++)\n                put_rac(c, state + 1 + FFMIN(i, 9), 1);\n            put_rac(c, state + 1 + 9, 0);\n            for (i = e - 1; i >= 0; i--)\n                put_rac(c, state + 22 + FFMIN(i, 9), (a >> i) & 1);\n            if (is_signed)\n                put_rac(c, state + 11 + 10, v < 0);\n        }\n    } else {\n        put_rac(c, state + 0, 1);\n    }\n#undef put_rac\n}', 'static inline void put_rac(RangeCoder *c, uint8_t *const state, int bit)\n{\n    int range1 = (c->range * (*state)) >> 8;\n    assert(*state);\n    assert(range1 < c->range);\n    assert(range1 > 0);\n    if (!bit) {\n        c->range -= range1;\n        *state    = c->zero_state[*state];\n    } else {\n        c->low  += c->range - range1;\n        c->range = range1;\n        *state   = c->one_state[*state];\n    }\n    renorm_encoder(c);\n}']