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

libavcodec/ffv1.c:752:1: Array declaration
750. 
751. #if CONFIG_FFV1_ENCODER
752. static int write_extra_header(FFV1Context *f){
     ^
753.     RangeCoder * const c= &f->c;
754.     uint8_t state[CONTEXT_SIZE];

libavcodec/ffv1.c:794:21: Call
792.                 for(k=0; k<CONTEXT_SIZE; k++){
793.                     int pred= j ? f->initial_states[i][j-1][k] : 128;
794.                     put_symbol(c, state2[k], (int8_t)(f->initial_states[i][j][k]-pred), 1);
                         ^
795.                 }
796.             }

libavcodec/ffv1.c:325:1: Parameter `*state`
  323. }
  324. 
  325. static av_noinline void put_symbol(RangeCoder *c, uint8_t *state, int v, int is_signed){
       ^
  326.     put_symbol_inline(c, state, v, is_signed, NULL, NULL);
  327. }

libavcodec/ffv1.c:326:5: Call
  324. 
  325. static av_noinline void put_symbol(RangeCoder *c, uint8_t *state, int v, int is_signed){
  326.     put_symbol_inline(c, state, v, is_signed, NULL, NULL);
           ^
  327. }
  328. 

libavcodec/ffv1.c:278:1: Parameter `*state`
    276. }
    277. 
    278. static av_always_inline av_flatten void put_symbol_inline(RangeCoder *c, uint8_t *state, int v, int is_signed, uint64_t rc_stat[256][2], uint64_t rc_stat2[32][2]){
         ^
    279.     int i;
    280. 

libavcodec/ffv1.c:313:17: Call
    311. 
    312.             for(i=e-1; i>=0; i--){
    313.                 put_rac(c, state+22+FFMIN(i,9), (a>>i)&1); //22..31
                         ^
    314.             }
    315. 

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    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 + (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        }\n    }\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], (int8_t)(f->initial_states[i][j][k]-pred), 1);\n                }\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, int v, int is_signed){\n    put_symbol_inline(c, state, v, is_signed, NULL, NULL);\n}', 'static av_always_inline av_flatten void put_symbol_inline(RangeCoder *c, uint8_t *state, int v, int is_signed, uint64_t rc_stat[256][2], uint64_t rc_stat2[32][2]){\n    int i;\n#define put_rac(C,S,B) \\\ndo{\\\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            }\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            }\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            }\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            }\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}']