libavcodec/mpc7.c:182: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 181 could be null and is dereferenced by call to `skip_bits()` at line 182, column 5.

libavcodec/mpc7.c:161:1: start of procedure mpc7_decode_frame()
159. }
160. 
161. static int mpc7_decode_frame(AVCodecContext * avctx,
     ^
162.                             void *data, int *data_size,
163.                             const uint8_t * buf, int buf_size)

libavcodec/mpc7.c:165:5: 
163.                             const uint8_t * buf, int buf_size)
164. {
165.     MPCContext *c = avctx->priv_data;
         ^
166.     GetBitContext gb;
167.     uint8_t *bits;

libavcodec/mpc7.c:169:5: 
167.     uint8_t *bits;
168.     int i, ch, t;
169.     int mb = -1;
         ^
170.     Band *bands = c->bands;
171.     int off;

libavcodec/mpc7.c:170:5: 
168.     int i, ch, t;
169.     int mb = -1;
170.     Band *bands = c->bands;
         ^
171.     int off;
172.     int bits_used, bits_avail;

libavcodec/mpc7.c:174:5: 
172.     int bits_used, bits_avail;
173. 
174.     memset(bands, 0, sizeof(bands));
         ^
175.     if(buf_size <= 4){
176.         av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", buf_size);

libavcodec/mpc7.c:175:8: Taking true branch
173. 
174.     memset(bands, 0, sizeof(bands));
175.     if(buf_size <= 4){
            ^
176.         av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", buf_size);
177.     }

libavcodec/mpc7.c:176:9: Skipping av_log(): empty list of specs
174.     memset(bands, 0, sizeof(bands));
175.     if(buf_size <= 4){
176.         av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", buf_size);
             ^
177.     }
178. 

libavcodec/mpc7.c:179:5: 
177.     }
178. 
179.     bits = av_malloc(((buf_size - 1) & ~3) + FF_INPUT_BUFFER_PADDING_SIZE);
         ^
180.     c->dsp.bswap_buf((uint32_t*)bits, (const uint32_t*)(buf + 4), (buf_size - 4) >> 2);
181.     init_get_bits(&gb, bits, (buf_size - 4)* 8);

libavutil/mem.c:43:1: start of procedure av_malloc()
  41.    linker will do it automatically */
  42. 
  43. void *av_malloc(unsigned int size)
      ^
  44. {
  45.     void *ptr = NULL;

libavutil/mem.c:45:5: 
  43. void *av_malloc(unsigned int size)
  44. {
  45.     void *ptr = NULL;
          ^
  46. #ifdef CONFIG_MEMALIGN_HACK
  47.     long diff;

libavutil/mem.c:51:8: Taking true branch
  49. 
  50.     /* let's disallow possible ambiguous cases */
  51.     if(size > (INT_MAX-16) )
             ^
  52.         return NULL;
  53. 

libavutil/mem.c:52:9: 
  50.     /* let's disallow possible ambiguous cases */
  51.     if(size > (INT_MAX-16) )
  52.         return NULL;
              ^
  53. 
  54. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:95:1: return from a call to av_malloc
  93. #endif
  94.     return ptr;
  95. }
      ^
  96. 
  97. void *av_realloc(void *ptr, unsigned int size)

libavcodec/mpc7.c:180:5: Skipping __function_pointer__(): unresolved function pointer
178. 
179.     bits = av_malloc(((buf_size - 1) & ~3) + FF_INPUT_BUFFER_PADDING_SIZE);
180.     c->dsp.bswap_buf((uint32_t*)bits, (const uint32_t*)(buf + 4), (buf_size - 4) >> 2);
         ^
181.     init_get_bits(&gb, bits, (buf_size - 4)* 8);
182.     skip_bits(&gb, buf[0]);

libavcodec/mpc7.c:181:5: 
179.     bits = av_malloc(((buf_size - 1) & ~3) + FF_INPUT_BUFFER_PADDING_SIZE);
180.     c->dsp.bswap_buf((uint32_t*)bits, (const uint32_t*)(buf + 4), (buf_size - 4) >> 2);
181.     init_get_bits(&gb, bits, (buf_size - 4)* 8);
         ^
182.     skip_bits(&gb, buf[0]);
183. 

libavcodec/bitstream.h:741:1: start of procedure init_get_bits()
  739.  * @param bit_size the size of the buffer in bits
  740.  */
  741. static inline void init_get_bits(GetBitContext *s,
       ^
  742.                    const uint8_t *buffer, int bit_size)
  743. {

libavcodec/bitstream.h:744:5: 
  742.                    const uint8_t *buffer, int bit_size)
  743. {
  744.     int buffer_size= (bit_size+7)>>3;
           ^
  745.     if(buffer_size < 0 || bit_size < 0) {
  746.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:745:8: Taking false branch
  743. {
  744.     int buffer_size= (bit_size+7)>>3;
  745.     if(buffer_size < 0 || bit_size < 0) {
              ^
  746.         buffer_size = bit_size = 0;
  747.         buffer = NULL;

libavcodec/bitstream.h:745:27: Taking false branch
  743. {
  744.     int buffer_size= (bit_size+7)>>3;
  745.     if(buffer_size < 0 || bit_size < 0) {
                                 ^
  746.         buffer_size = bit_size = 0;
  747.         buffer = NULL;

libavcodec/bitstream.h:750:5: 
  748.     }
  749. 
  750.     s->buffer= buffer;
           ^
  751.     s->size_in_bits= bit_size;
  752.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:751:5: 
  749. 
  750.     s->buffer= buffer;
  751.     s->size_in_bits= bit_size;
           ^
  752.     s->buffer_end= buffer + buffer_size;
  753. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:752:5: 
  750.     s->buffer= buffer;
  751.     s->size_in_bits= bit_size;
  752.     s->buffer_end= buffer + buffer_size;
           ^
  753. #ifdef ALT_BITSTREAM_READER
  754.     s->index=0;

libavcodec/bitstream.h:754:5: 
  752.     s->buffer_end= buffer + buffer_size;
  753. #ifdef ALT_BITSTREAM_READER
  754.     s->index=0;
           ^
  755. #elif defined LIBMPEG2_BITSTREAM_READER
  756.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:764:1: return from a call to init_get_bits
  762.     skip_bits_long(s, 0);
  763. #endif
  764. }
       ^
  765. 
  766. static inline void align_get_bits(GetBitContext *s)

libavcodec/mpc7.c:182:5: 
180.     c->dsp.bswap_buf((uint32_t*)bits, (const uint32_t*)(buf + 4), (buf_size - 4) >> 2);
181.     init_get_bits(&gb, bits, (buf_size - 4)* 8);
182.     skip_bits(&gb, buf[0]);
         ^
183. 
184.     /* read subband indexes */

libavcodec/bitstream.h:661:1: start of procedure skip_bits()
  659. }
  660. 
  661. static inline void skip_bits(GetBitContext *s, int n){
       ^
  662.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
  663.     OPEN_READER(re, s)

libavcodec/bitstream.h:663:5: 
  661. static inline void skip_bits(GetBitContext *s, int n){
  662.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
  663.     OPEN_READER(re, s)
           ^
  664.     UPDATE_CACHE(re, s)
  665.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:664:5: 
  662.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
  663.     OPEN_READER(re, s)
  664.     UPDATE_CACHE(re, s)
           ^
  665.     LAST_SKIP_BITS(re, s, n)
  666.     CLOSE_READER(re, s)
