libavcodec/shorten.c:319: error: Integer Overflow L2
  ([0, +oo] - [0, 31]):unsigned32 by call to `get_sr_golomb_shorten`.

libavcodec/shorten.c:276:1: Parameter `s->bc.bits_left`
274. };
275. 
276. static int decode_subframe_lpc(ShortenContext *s, int command, int channel,
     ^
277.                                int residual_size, int32_t coffset)
278. {

libavcodec/shorten.c:319:34: Call
317.         for (j = 0; j < pred_order; j++)
318.             sum += coeffs[j] * s->decoded[channel][i - j - 1];
319.         s->decoded[channel][i] = get_sr_golomb_shorten(&s->bc, residual_size) +
                                      ^
320.                                  (sum >> qshift);
321.     }

libavcodec/golomb.h:348:1: Parameter `bc->bits_left`
  346.  * read signed golomb rice code (shorten).
  347.  */
  348. static inline int get_sr_golomb_shorten(BitstreamContext *bc, int k)
       ^
  349. {
  350.     int uvar = get_ur_golomb_jpegls(bc, k + 1, INT_MAX, 0);

libavcodec/golomb.h:350:16: Call
  348. static inline int get_sr_golomb_shorten(BitstreamContext *bc, int k)
  349. {
  350.     int uvar = get_ur_golomb_jpegls(bc, k + 1, INT_MAX, 0);
                      ^
  351.     if (uvar & 1)
  352.         return ~(uvar >> 1);

libavcodec/golomb.h:275:1: Parameter `k`
    273.  * read unsigned golomb rice code (jpegls).
    274.  */
    275. static inline int get_ur_golomb_jpegls(BitstreamContext *bc, int k, int limit,
         ^
    276.                                        int esc_len)
    277. {

libavcodec/golomb.h:288:9: Call
    286.         buf >>= log - k;
    287.         buf  += (30 - log) << k;
    288.         bitstream_skip(bc, 32 + k - log);
                 ^
    289. 
    290.         return buf;

libavcodec/bitstream.h:240:1: Parameter `n`
      238. 
      239. /* Skip n bits in the buffer. */
      240. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
           ^
      241. {
      242.     if (n < bc->bits_left)

libavcodec/bitstream.h:243:9: Call
      241. {
      242.     if (n < bc->bits_left)
      243.         skip_remaining(bc, n);
                   ^
      244.     else {
      245.         n -= bc->bits_left;

libavcodec/bitstream.h:229:1: <LHS trace>
227. }
228. 
229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
230. {
231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: Parameter `bc->bits_left`
        227. }
        228. 
        229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
             ^
        230. {
        231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: <RHS trace>
227. }
228. 
229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
230. {
231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: Parameter `n`
        227. }
        228. 
        229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
             ^
        230. {
        231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:236:5: Binary operation: ([0, +oo] - [0, 31]):unsigned32 by call to `get_sr_golomb_shorten` 
        234.     bc->bits <<= n;
        235. #endif
        236.     bc->bits_left -= n;
                 ^
        237. }
        238. 

static inline void skip_remaining(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    bc->bits >>= n;
#else
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
}
['static int decode_subframe_lpc(ShortenContext *s, int command, int channel,\n                               int residual_size, int32_t coffset)\n{\n    int pred_order, sum, qshift, init_sum, i, j;\n    const int *coeffs;\n    if (command == FN_QLPC) {\n        pred_order = get_ur_golomb_shorten(&s->bc, LPCQSIZE);\n        if (pred_order > s->nwrap) {\n            av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\\n",\n                   pred_order);\n            return AVERROR(EINVAL);\n        }\n        for (i = 0; i < pred_order; i++)\n            s->coeffs[i] = get_sr_golomb_shorten(&s->bc, LPCQUANT);\n        coeffs = s->coeffs;\n        qshift = LPCQUANT;\n    } else {\n        pred_order = command;\n        if (pred_order >= FF_ARRAY_ELEMS(fixed_coeffs)) {\n            av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\\n",\n                   pred_order);\n            return AVERROR_INVALIDDATA;\n        }\n        coeffs     = fixed_coeffs[pred_order];\n        qshift     = 0;\n    }\n    if (command == FN_QLPC && coffset)\n        for (i = -pred_order; i < 0; i++)\n            s->decoded[channel][i] -= coffset;\n    init_sum = pred_order ? (command == FN_QLPC ? s->lpcqoffset : 0) : coffset;\n    for (i = 0; i < s->blocksize; i++) {\n        sum = init_sum;\n        for (j = 0; j < pred_order; j++)\n            sum += coeffs[j] * s->decoded[channel][i - j - 1];\n        s->decoded[channel][i] = get_sr_golomb_shorten(&s->bc, residual_size) +\n                                 (sum >> qshift);\n    }\n    if (command == FN_QLPC && coffset)\n        for (i = 0; i < s->blocksize; i++)\n            s->decoded[channel][i] += coffset;\n    return 0;\n}', 'static inline int get_sr_golomb_shorten(BitstreamContext *bc, int k)\n{\n    int uvar = get_ur_golomb_jpegls(bc, k + 1, INT_MAX, 0);\n    if (uvar & 1)\n        return ~(uvar >> 1);\n    else\n        return uvar >> 1;\n}', 'static inline int get_ur_golomb_jpegls(BitstreamContext *bc, int k, int limit,\n                                       int esc_len)\n{\n    unsigned int buf;\n    int log;\n    buf = bitstream_peek(bc, 32);\n    log = av_log2(buf);\n    if (log - k >= 1 && 32 - log < limit) {\n        buf >>= log - k;\n        buf  += (30 - log) << k;\n        bitstream_skip(bc, 32 + k - log);\n        return buf;\n    } else {\n        int i;\n        for (i = 0;\n             i < limit && bitstream_read_bit(bc) == 0 && bitstream_bits_left(bc) > 0;\n             i++);\n        if (i < limit - 1) {\n            buf = bitstream_read(bc, k);\n            return buf + (i << k);\n        } else if (i == limit - 1) {\n            buf = bitstream_read(bc, esc_len);\n            return buf + 1;\n        } else\n            return -1;\n    }\n}', 'static inline void bitstream_skip(BitstreamContext *bc, unsigned n)\n{\n    if (n < bc->bits_left)\n        skip_remaining(bc, n);\n    else {\n        n -= bc->bits_left;\n        bc->bits      = 0;\n        bc->bits_left = 0;\n        if (n >= 64) {\n            unsigned skip = n / 8;\n            n -= skip * 8;\n            bc->ptr += skip;\n        }\n        refill_64(bc);\n        if (n)\n            skip_remaining(bc, n);\n    }\n}', 'static inline void skip_remaining(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    bc->bits >>= n;\n#else\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n}']