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

libavcodec/shorten.c:284:22: Call
282.     if (command == FN_QLPC) {
283.         /* read/validate prediction order */
284.         pred_order = get_ur_golomb_shorten(&s->bc, LPCQSIZE);
                          ^
285.         if (pred_order > s->nwrap) {
286.             av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n",

libavcodec/golomb.h:346:12: Call
  344. static inline unsigned int get_ur_golomb_shorten(BitstreamContext *bc, int k)
  345. {
  346.     return get_ur_golomb_jpegls(bc, k, INT_MAX, 0);
                  ^
  347. }
  348. 

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:299:23: Call
    297.         if (i < limit - 1) {
    298.             if (k) {
    299.                 buf = bitstream_read(bc, k);
                               ^
    300.             } else {
    301.                 buf = 0;

libavcodec/bitstream.h:183:1: Parameter `bc->bits_left`
      181. 
      182. /* Return n bits from the buffer. n has to be in the 0-32 range. */
      183. static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned n)
           ^
      184. {
      185.     if (!n)

libavcodec/shorten.c:292:28: Call
290.         /* read LPC coefficients */
291.         for (i = 0; i < pred_order; i++)
292.             s->coeffs[i] = get_sr_golomb_shorten(&s->bc, LPCQUANT);
                                ^
293.         coeffs = s->coeffs;
294. 

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

libavcodec/golomb.h:354:16: Call
  352. static inline int get_sr_golomb_shorten(BitstreamContext *bc, int k)
  353. {
  354.     int uvar = get_ur_golomb_jpegls(bc, k + 1, INT_MAX, 0);
                      ^
  355.     if (uvar & 1)
  356.         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:241:1: Parameter `n`
      239. 
      240. /* Skip n bits in the buffer. */
      241. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
           ^
      242. {
      243.     if (n <= bc->bits_left)

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

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

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

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

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

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

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 unsigned int get_ur_golomb_shorten(BitstreamContext *bc, int k)\n{\n    return get_ur_golomb_jpegls(bc, k, INT_MAX, 0);\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; i < limit && bitstream_peek(bc, 1) == 0 && bitstream_bits_left(bc) > 0; i++)\n            bitstream_skip(bc, 1);\n        bitstream_skip(bc, 1);\n        if (i < limit - 1) {\n            if (k) {\n                buf = bitstream_read(bc, k);\n            } else {\n                buf = 0;\n            }\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 uint32_t bitstream_read(BitstreamContext *bc, unsigned n)\n{\n    if (!n)\n        return 0;\n    if (n > bc->bits_left) {\n        refill_32(bc);\n        if (bc->bits_left < 32)\n            bc->bits_left = n;\n    }\n    return get_val(bc, n);\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 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        skip_remaining(bc, bc->bits_left);\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}']