libavcodec/ffv1.c:1260: error: Buffer Overrun L2
  Offset: [1, 138] (⇐ [0, 11] + [1, 127]) Size: 8 by call to `read_quant_tables`.

libavcodec/ffv1.c:1225:1: Parameter `f->quant_tables[*]`
1223. }
1224. 
1225. static int read_extra_header(FFV1Context *f){
      ^
1226.     RangeCoder * const c= &f->c;
1227.     uint8_t state[CONTEXT_SIZE];

libavcodec/ffv1.c:1260:34: Call
1258.         return -1;
1259.     for(i=0; i<f->quant_table_count; i++){
1260.         if((f->context_count[i]= read_quant_tables(c, f->quant_tables[i])) < 0){
                                       ^
1261.             av_log(f->avctx, AV_LOG_ERROR, "read_quant_table error\n");
1262.             return -1;

libavcodec/ffv1.c:1212:1: Parameter `*quant_table`
  1210. }
  1211. 
  1212. static int read_quant_tables(RangeCoder *c, int16_t quant_table[MAX_CONTEXT_INPUTS][256]){
        ^
  1213.     int i;
  1214.     int context_count=1;

libavcodec/ffv1.c:1217:25: Call
  1215. 
  1216.     for(i=0; i<5; i++){
  1217.         context_count*= read_quant_table(c, quant_table[i], context_count);
                                ^
  1218.         if(context_count > 32768U){
  1219.             return -1;

libavcodec/ffv1.c:1204:9: <Offset trace>
1202.     }
1203. 
1204.     for(i=1; i<128; i++){
              ^
1205.         quant_table[256-i]= -quant_table[i];
1206.     }

libavcodec/ffv1.c:1204:9: Assignment
    1202.     }
    1203. 
    1204.     for(i=1; i<128; i++){
                  ^
    1205.         quant_table[256-i]= -quant_table[i];
    1206.     }

libavcodec/ffv1.c:1184:1: <Length trace>
1182. }
1183. 
1184. static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale){
      ^
1185.     int v;
1186.     int i=0;

libavcodec/ffv1.c:1184:1: Parameter `*quant_table`
    1182. }
    1183. 
    1184. static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale){
          ^
    1185.     int v;
    1186.     int i=0;

libavcodec/ffv1.c:1205:30: Array access: Offset: [1, 138] (⇐ [0, 11] + [1, 127]) Size: 8 by call to `read_quant_tables` 
    1203. 
    1204.     for(i=1; i<128; i++){
    1205.         quant_table[256-i]= -quant_table[i];
                                       ^
    1206.     }
    1207.     quant_table[128]= -quant_table[127];

static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale){
    int v;
    int i=0;
    uint8_t state[CONTEXT_SIZE];
    memset(state, 128, sizeof(state));
    for(v=0; i<128 ; v++){
        int len= get_symbol(c, state, 0) + 1;
        if(len + i > 128) return -1;
        while(len--){
            quant_table[i] = scale*v;
            i++;
        }
    }
    for(i=1; i<128; i++){
        quant_table[256-i]= -quant_table[i];
    }
    quant_table[128]= -quant_table[127];
    return 2*v - 1;
}
['static int read_extra_header(FFV1Context *f){\n    RangeCoder * const c= &f->c;\n    uint8_t state[CONTEXT_SIZE];\n    int i;\n    memset(state, 128, sizeof(state));\n    ff_init_range_decoder(c, f->avctx->extradata, f->avctx->extradata_size);\n    ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);\n    f->version= get_symbol(c, state, 0);\n    f->ac= f->avctx->coder_type= get_symbol(c, state, 0);\n    if(f->ac>1){\n        for(i=1; i<256; i++){\n            f->state_transition[i]= get_symbol(c, state, 1) + c->one_state[i];\n        }\n    }\n    f->colorspace= get_symbol(c, state, 0);\n    f->avctx->bits_per_raw_sample= get_symbol(c, state, 0);\n    get_rac(c, state);\n    f->chroma_h_shift= get_symbol(c, state, 0);\n    f->chroma_v_shift= get_symbol(c, state, 0);\n    get_rac(c, state);\n    f->plane_count= 2;\n    f->num_h_slices= 1 + get_symbol(c, state, 0);\n    f->num_v_slices= 1 + get_symbol(c, state, 0);\n    if(f->num_h_slices > (unsigned)f->width || f->num_v_slices > (unsigned)f->height){\n        av_log(f->avctx, AV_LOG_ERROR, "too many slices\\n");\n        return -1;\n    }\n    f->quant_table_count= get_symbol(c, state, 0);\n    if(f->quant_table_count > (unsigned)MAX_QUANT_TABLES)\n        return -1;\n    for(i=0; i<f->quant_table_count; i++){\n        if((f->context_count[i]= read_quant_tables(c, f->quant_tables[i])) < 0){\n            av_log(f->avctx, AV_LOG_ERROR, "read_quant_table error\\n");\n            return -1;\n        }\n    }\n    return 0;\n}', 'static int read_quant_tables(RangeCoder *c, int16_t quant_table[MAX_CONTEXT_INPUTS][256]){\n    int i;\n    int context_count=1;\n    for(i=0; i<5; i++){\n        context_count*= read_quant_table(c, quant_table[i], context_count);\n        if(context_count > 32768U){\n            return -1;\n        }\n    }\n    return (context_count+1)/2;\n}', 'static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale){\n    int v;\n    int i=0;\n    uint8_t state[CONTEXT_SIZE];\n    memset(state, 128, sizeof(state));\n    for(v=0; i<128 ; v++){\n        int len= get_symbol(c, state, 0) + 1;\n        if(len + i > 128) return -1;\n        while(len--){\n            quant_table[i] = scale*v;\n            i++;\n        }\n    }\n    for(i=1; i<128; i++){\n        quant_table[256-i]= -quant_table[i];\n    }\n    quant_table[128]= -quant_table[127];\n    return 2*v - 1;\n}']