libavcodec/binkaudio.c:316: error: Integer Overflow L2
  ([0, 64] - [0, 64]):unsigned32 by call to `bitstream_skip`.

libavcodec/binkaudio.c:312:9: Call
310.         s->packet_buffer = buf;
311.         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
312.         bitstream_init(bc, s->packet_buffer, avpkt->size * 8);
             ^
313.         consumed = avpkt->size;
314. 

libavcodec/bitstream.h:85:9: Assignment
  83.         bc->buffer    =
  84.         bc->ptr       = NULL;
  85.         bc->bits_left = 0;
              ^
  86.         return AVERROR_INVALIDDATA;
  87.     }

libavcodec/binkaudio.c:316:9: Call
314. 
315.         /* skip reported size */
316.         bitstream_skip(bc, 32);
             ^
317.     }
318. 

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:247:9: Call
  245.     else {
  246.         n -= bc->bits_left;
  247.         skip_remaining(bc, bc->bits_left);
               ^
  248.         if (n >= 64) {
  249.             unsigned skip = n / 8;

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, 64] - [0, 64]):unsigned32 by call to `bitstream_skip` 
    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_frame(AVCodecContext *avctx, void *data,\n                        int *got_frame_ptr, AVPacket *avpkt)\n{\n    BinkAudioContext *s = avctx->priv_data;\n    AVFrame *frame      = data;\n    BitstreamContext *bc = &s->bc;\n    int ret, consumed = 0;\n    if (!bitstream_bits_left(bc)) {\n        uint8_t *buf;\n        if (!avpkt->size) {\n            *got_frame_ptr = 0;\n            return 0;\n        }\n        if (avpkt->size < 4) {\n            av_log(avctx, AV_LOG_ERROR, "Packet is too small\\n");\n            return AVERROR_INVALIDDATA;\n        }\n        buf = av_realloc(s->packet_buffer, avpkt->size + AV_INPUT_BUFFER_PADDING_SIZE);\n        if (!buf)\n            return AVERROR(ENOMEM);\n        s->packet_buffer = buf;\n        memcpy(s->packet_buffer, avpkt->data, avpkt->size);\n        bitstream_init(bc, s->packet_buffer, avpkt->size * 8);\n        consumed = avpkt->size;\n        bitstream_skip(bc, 32);\n    }\n    frame->nb_samples = s->frame_len;\n    if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {\n        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\\n");\n        return ret;\n    }\n    if (decode_block(s, (float **)frame->extended_data,\n                     avctx->codec->id == AV_CODEC_ID_BINKAUDIO_DCT)) {\n        av_log(avctx, AV_LOG_ERROR, "Incomplete packet\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    get_bits_align32(bc);\n    frame->nb_samples = s->block_size / avctx->channels;\n    *got_frame_ptr    = 1;\n    return consumed;\n}', 'static inline int bitstream_init(BitstreamContext *bc, const uint8_t *buffer,\n                                 unsigned bit_size)\n{\n    unsigned buffer_size;\n    if (bit_size > INT_MAX - 7 || !buffer) {\n        buffer        =\n        bc->buffer    =\n        bc->ptr       = NULL;\n        bc->bits_left = 0;\n        return AVERROR_INVALIDDATA;\n    }\n    buffer_size = (bit_size + 7) >> 3;\n    bc->buffer       = buffer;\n    bc->buffer_end   = buffer + buffer_size;\n    bc->ptr          = bc->buffer;\n    bc->size_in_bits = bit_size;\n    bc->bits_left    = 0;\n    bc->bits         = 0;\n    refill_64(bc);\n    return 0;\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}']