libavcodec/alsdec.c:1182: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `bitstream_read_bit`.

libavcodec/alsdec.c:1175:1: Parameter `ctx->bc.bits_left`
1173. /** Read the channel data.
1174.   */
1175. static int read_channel_data(ALSDecContext *ctx, ALSChannelData *cd, int c)
      ^
1176. {
1177.     BitstreamContext *bc    = &ctx->bc;

libavcodec/alsdec.c:1182:57: Call
1180.     int entries             = 0;
1181. 
1182.     while (entries < channels && !(current->stop_flag = bitstream_read_bit(bc))) {
                                                              ^
1183.         current->master_channel = bitstream_read(bc, av_ceil_log2(channels));
1184. 

libavcodec/bitstream.h:145:1: Parameter `bc->bits_left`
  143. 
  144. /* Return one bit from the buffer. */
  145. static inline unsigned bitstream_read_bit(BitstreamContext *bc)
       ^
  146. {
  147.     if (!bc->bits_left)

libavcodec/bitstream.h:150:12: Call
  148.         refill_64(bc);
  149. 
  150.     return get_val(bc, 1);
                  ^
  151. }
  152. 

libavcodec/bitstream.h:130:1: <LHS trace>
128. }
129. 
130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
131. {
132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: Parameter `bc->bits_left`
    128. }
    129. 
    130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
         ^
    131. {
    132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: <RHS trace>
128. }
129. 
130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
131. {
132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: Parameter `n`
    128. }
    129. 
    130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
         ^
    131. {
    132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:139:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `bitstream_read_bit` 
    137.     bc->bits <<= n;
    138. #endif
    139.     bc->bits_left -= n;
             ^
    140. 
    141.     return ret;

static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    uint64_t ret = bc->bits & ((UINT64_C(1) << n) - 1);
    bc->bits >>= n;
#else
    uint64_t ret = bc->bits >> (64 - n);
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
    return ret;
}
['static int read_channel_data(ALSDecContext *ctx, ALSChannelData *cd, int c)\n{\n    BitstreamContext *bc    = &ctx->bc;\n    ALSChannelData *current = cd;\n    unsigned int channels   = ctx->avctx->channels;\n    int entries             = 0;\n    while (entries < channels && !(current->stop_flag = bitstream_read_bit(bc))) {\n        current->master_channel = bitstream_read(bc, av_ceil_log2(channels));\n        if (current->master_channel >= channels) {\n            av_log(ctx->avctx, AV_LOG_ERROR, "Invalid master channel!\\n");\n            return AVERROR_INVALIDDATA;\n        }\n        if (current->master_channel != c) {\n            current->time_diff_flag = bitstream_read_bit(bc);\n            current->weighting[0]   = als_weighting(bc, 1, 16);\n            current->weighting[1]   = als_weighting(bc, 2, 14);\n            current->weighting[2]   = als_weighting(bc, 1, 16);\n            if (current->time_diff_flag) {\n                current->weighting[3] = als_weighting(bc, 1, 16);\n                current->weighting[4] = als_weighting(bc, 1, 16);\n                current->weighting[5] = als_weighting(bc, 1, 16);\n                current->time_diff_sign  = bitstream_read_bit(bc);\n                current->time_diff_index = bitstream_read(bc, ctx->ltp_lag_length - 3) + 3;\n            }\n        }\n        current++;\n        entries++;\n    }\n    if (entries == channels) {\n        av_log(ctx->avctx, AV_LOG_ERROR, "Damaged channel data!\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    bitstream_align(bc);\n    return 0;\n}', 'static inline unsigned bitstream_read_bit(BitstreamContext *bc)\n{\n    if (!bc->bits_left)\n        refill_64(bc);\n    return get_val(bc, 1);\n}', 'static inline uint64_t get_val(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    uint64_t ret = bc->bits & ((UINT64_C(1) << n) - 1);\n    bc->bits >>= n;\n#else\n    uint64_t ret = bc->bits >> (64 - n);\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n    return ret;\n}']