libavcodec/atrac3plus.c:1796: error: Integer Overflow L2
  ([-1, +oo] - 1):unsigned32 by call to `get_subband_flags`.

libavcodec/atrac3plus.c:1793:5: Call
1791.         return ret;
1792. 
1793.     decode_spectrum(bc, ctx, num_channels, avctx);
          ^
1794. 
1795.     if (num_channels == 2) {

libavcodec/atrac3plus.c:852:1: Parameter `bc->bits_left`
  850.  * @param[in]     avctx         ptr to the AVCodecContext
  851.  */
  852. static void decode_spectrum(BitstreamContext *bc, Atrac3pChanUnitCtx *ctx,
       ^
  853.                             int num_channels, AVCodecContext *avctx)
  854. {

libavcodec/atrac3plus.c:1796:9: Call
1794. 
1795.     if (num_channels == 2) {
1796.         get_subband_flags(bc, ctx->swap_channels, ctx->num_coded_subbands);
              ^
1797.         get_subband_flags(bc, ctx->negate_coeffs, ctx->num_coded_subbands);
1798.     }

libavcodec/atrac3plus.c:922:1: Parameter `bc->bits_left`
  920.  * @return: 0 = all flag bits are zero, 1 = there is at least one non-zero flag bit
  921.  */
  922. static int get_subband_flags(BitstreamContext *bc, uint8_t *out, int num_flags)
       ^
  923. {
  924.     int i, result;

libavcodec/atrac3plus.c:928:14: Call
  926.     memset(out, 0, num_flags);
  927. 
  928.     result = bitstream_read_bit(bc);
                    ^
  929.     if (result) {
  930.         if (bitstream_read_bit(bc))

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: 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: Assignment
      137.     bc->bits <<= n;
      138. #endif
      139.     bc->bits_left -= n;
               ^
      140. 
      141.     return ret;

libavcodec/atrac3plus.c:930:13: Call
  928.     result = bitstream_read_bit(bc);
  929.     if (result) {
  930.         if (bitstream_read_bit(bc))
                   ^
  931.             for (i = 0; i < num_flags; i++)
  932.                 out[i] = bitstream_read_bit(bc);

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: ([-1, +oo] - 1):unsigned32 by call to `get_subband_flags` 
      137.     bc->bits <<= n;
      138. #endif
      139.     bc->bits_left -= n;
               ^
      140. 
      141.     return ret;
