libavcodec/proresdec.c:426: error: Integer Overflow L2
  ([2, 62] - [1, 4]):unsigned32 by call to `decode_dc_coeffs`.

libavcodec/proresdec.c:426:5: Call
424.     init_get_bits(&gb, buf, data_size << 3);
425. 
426.     decode_dc_coeffs(&gb, td->blocks, blocks_per_slice);
         ^
427. 
428.     decode_ac_coeffs(&gb, td->blocks, blocks_per_slice,

libavcodec/proresdec.c:336:1: Global `ff_prores_dc_codebook`
  334.  * Decode DC coefficients for all blocks in a slice.
  335.  */
  336. static inline void decode_dc_coeffs(GetBitContext *gb, DCTELEM *out,
       ^
  337.                                     int nblocks)
  338. {

libavcodec/proresdec.c:351:16: Call
  349. 
  350.     for (i = 1; i < nblocks; i++, out += 64) {
  351.         code = decode_vlc_codeword(gb, ff_prores_dc_codebook[FFMIN(FFABS(delta), 3)]);
                      ^
  352. 
  353.         sign     = -(((delta >> 15) & 1) ^ (code & 1));

libavcodec/proresdec.c:292:1: <LHS trace>
290.  * Read an unsigned rice/exp golomb codeword.
291.  */
292. static inline int decode_vlc_codeword(GetBitContext *gb, unsigned codebook)
     ^
293. {
294.     unsigned int rice_order, exp_order, switch_bits;

libavcodec/proresdec.c:292:1: Parameter `codebook`
    290.  * Read an unsigned rice/exp golomb codeword.
    291.  */
    292. static inline int decode_vlc_codeword(GetBitContext *gb, unsigned codebook)
         ^
    293. {
    294.     unsigned int rice_order, exp_order, switch_bits;

libavcodec/proresdec.c:303:5: Assignment
    301. 
    302.     /* number of prefix bits to switch between Rice and expGolomb */
    303.     switch_bits = (codebook & 3) + 1;
             ^
    304.     rice_order  = codebook >> 5;        /* rice code order */
    305.     exp_order   = (codebook >> 2) & 7;  /* exp golomb code order */

libavcodec/proresdec.c:292:1: <RHS trace>
290.  * Read an unsigned rice/exp golomb codeword.
291.  */
292. static inline int decode_vlc_codeword(GetBitContext *gb, unsigned codebook)
     ^
293. {
294.     unsigned int rice_order, exp_order, switch_bits;

libavcodec/proresdec.c:292:1: Parameter `codebook`
    290.  * Read an unsigned rice/exp golomb codeword.
    291.  */
    292. static inline int decode_vlc_codeword(GetBitContext *gb, unsigned codebook)
         ^
    293. {
    294.     unsigned int rice_order, exp_order, switch_bits;

libavcodec/proresdec.c:303:5: Assignment
    301. 
    302.     /* number of prefix bits to switch between Rice and expGolomb */
    303.     switch_bits = (codebook & 3) + 1;
             ^
    304.     rice_order  = codebook >> 5;        /* rice code order */
    305.     exp_order   = (codebook >> 2) & 7;  /* exp golomb code order */

libavcodec/proresdec.c:320:9: Binary operation: ([2, 62] - [1, 4]):unsigned32 by call to `decode_dc_coeffs` 
    318.         }
    319.     } else { /* otherwise we got a exp golomb code */
    320.         len  = (log << 1) - switch_bits + exp_order + 1;
                 ^
    321.         code = NEG_USR32(buf, len) - (1 << exp_order) + (switch_bits << rice_order);
    322.         LAST_SKIP_BITS(re, gb, len);

static inline int decode_vlc_codeword(GetBitContext *gb, unsigned codebook)
{
    unsigned int rice_order, exp_order, switch_bits;
    unsigned int buf, code;
    int log, prefix_len, len;
    OPEN_READER(re, gb);
    UPDATE_CACHE(re, gb);
    buf = GET_CACHE(re, gb);
    switch_bits = (codebook & 3) + 1;
    rice_order  = codebook >> 5;
    exp_order   = (codebook >> 2) & 7;
    log = 31 - av_log2(buf);
    if (log < switch_bits) {
        if (!rice_order) {
            code = log;
            LAST_SKIP_BITS(re, gb, log + 1);
        } else {
            prefix_len = log + 1;
            code = (log << rice_order) + NEG_USR32(buf << prefix_len, rice_order);
            LAST_SKIP_BITS(re, gb, prefix_len + rice_order);
        }
    } else {
        len  = (log << 1) - switch_bits + exp_order + 1;
        code = NEG_USR32(buf, len) - (1 << exp_order) + (switch_bits << rice_order);
        LAST_SKIP_BITS(re, gb, len);
    }
    CLOSE_READER(re, gb);
    return code;
}
['static void decode_slice_plane(ProresContext *ctx, ProresThreadData *td,\n                               const uint8_t *buf,\n                               int data_size, uint16_t *out_ptr,\n                               int linesize, int mbs_per_slice,\n                               int blocks_per_mb, int plane_size_factor,\n                               const int16_t *qmat)\n{\n    GetBitContext gb;\n    DCTELEM *block_ptr;\n    int mb_num, blocks_per_slice;\n    blocks_per_slice = mbs_per_slice * blocks_per_mb;\n    memset(td->blocks, 0, 8 * 4 * 64 * sizeof(*td->blocks));\n    init_get_bits(&gb, buf, data_size << 3);\n    decode_dc_coeffs(&gb, td->blocks, blocks_per_slice);\n    decode_ac_coeffs(&gb, td->blocks, blocks_per_slice,\n                     plane_size_factor, ctx->scantable.permutated);\n    block_ptr = td->blocks;\n    for (mb_num = 0; mb_num < mbs_per_slice; mb_num++, out_ptr += blocks_per_mb * 4) {\n        ctx->dsp.idct_put(out_ptr,                    linesize, block_ptr, qmat);\n        block_ptr += 64;\n        if (blocks_per_mb > 2) {\n            ctx->dsp.idct_put(out_ptr + 8,            linesize, block_ptr, qmat);\n            block_ptr += 64;\n        }\n        ctx->dsp.idct_put(out_ptr + linesize * 4,     linesize, block_ptr, qmat);\n        block_ptr += 64;\n        if (blocks_per_mb > 2) {\n            ctx->dsp.idct_put(out_ptr + linesize * 4 + 8, linesize, block_ptr, qmat);\n            block_ptr += 64;\n        }\n    }\n}', 'static inline void decode_dc_coeffs(GetBitContext *gb, DCTELEM *out,\n                                    int nblocks)\n{\n    DCTELEM prev_dc;\n    int     i, sign;\n    int16_t delta;\n    unsigned int code;\n    code   = decode_vlc_codeword(gb, FIRST_DC_CB);\n    out[0] = prev_dc = TOSIGNED(code);\n    out   += 64;\n    delta  = 3;\n    for (i = 1; i < nblocks; i++, out += 64) {\n        code = decode_vlc_codeword(gb, ff_prores_dc_codebook[FFMIN(FFABS(delta), 3)]);\n        sign     = -(((delta >> 15) & 1) ^ (code & 1));\n        delta    = (((code + 1) >> 1) ^ sign) - sign;\n        prev_dc += delta;\n        out[0]   = prev_dc;\n    }\n}', 'static inline int decode_vlc_codeword(GetBitContext *gb, unsigned codebook)\n{\n    unsigned int rice_order, exp_order, switch_bits;\n    unsigned int buf, code;\n    int log, prefix_len, len;\n    OPEN_READER(re, gb);\n    UPDATE_CACHE(re, gb);\n    buf = GET_CACHE(re, gb);\n    switch_bits = (codebook & 3) + 1;\n    rice_order  = codebook >> 5;\n    exp_order   = (codebook >> 2) & 7;\n    log = 31 - av_log2(buf);\n    if (log < switch_bits) {\n        if (!rice_order) {\n            code = log;\n            LAST_SKIP_BITS(re, gb, log + 1);\n        } else {\n            prefix_len = log + 1;\n            code = (log << rice_order) + NEG_USR32(buf << prefix_len, rice_order);\n            LAST_SKIP_BITS(re, gb, prefix_len + rice_order);\n        }\n    } else {\n        len  = (log << 1) - switch_bits + exp_order + 1;\n        code = NEG_USR32(buf, len) - (1 << exp_order) + (switch_bits << rice_order);\n        LAST_SKIP_BITS(re, gb, len);\n    }\n    CLOSE_READER(re, gb);\n    return code;\n}']