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

libavcodec/mpc7.c:157:1: start of procedure mpc7_decode_frame()
155. }
156. 
157. static int mpc7_decode_frame(AVCodecContext * avctx,
     ^
158.                             void *data, int *data_size,
159.                             const uint8_t * buf, int buf_size)

libavcodec/mpc7.c:161:5: 
159.                             const uint8_t * buf, int buf_size)
160. {
161.     MPCContext *c = avctx->priv_data;
         ^
162.     GetBitContext gb;
163.     uint8_t *bits;

libavcodec/mpc7.c:165:5: 
163.     uint8_t *bits;
164.     int i, ch, t;
165.     int mb = -1;
         ^
166.     Band *bands = c->bands;
167.     int off;

libavcodec/mpc7.c:166:5: 
164.     int i, ch, t;
165.     int mb = -1;
166.     Band *bands = c->bands;
         ^
167.     int off;
168.     int bits_used, bits_avail;

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

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

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

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

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking true branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:56:9: 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
  56.         return NULL;
              ^
  57. 
  58. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:99:1: return from a call to av_malloc
   97. #endif
   98.     return ptr;
   99. }
       ^
  100. 
  101. void *av_realloc(void *ptr, unsigned int size)

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

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

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

libavcodec/bitstream.h:740:5: 
  738.                    const uint8_t *buffer, int bit_size)
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
           ^
  741.     if(buffer_size < 0 || bit_size < 0) {
  742.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:741:8: Taking false branch
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
  741.     if(buffer_size < 0 || bit_size < 0) {
              ^
  742.         buffer_size = bit_size = 0;
  743.         buffer = NULL;

libavcodec/bitstream.h:741:27: Taking false branch
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
  741.     if(buffer_size < 0 || bit_size < 0) {
                                 ^
  742.         buffer_size = bit_size = 0;
  743.         buffer = NULL;

libavcodec/bitstream.h:746:5: 
  744.     }
  745. 
  746.     s->buffer= buffer;
           ^
  747.     s->size_in_bits= bit_size;
  748.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:747:5: 
  745. 
  746.     s->buffer= buffer;
  747.     s->size_in_bits= bit_size;
           ^
  748.     s->buffer_end= buffer + buffer_size;
  749. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:748:5: 
  746.     s->buffer= buffer;
  747.     s->size_in_bits= bit_size;
  748.     s->buffer_end= buffer + buffer_size;
           ^
  749. #ifdef ALT_BITSTREAM_READER
  750.     s->index=0;

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

libavcodec/bitstream.h:760:1: return from a call to init_get_bits
  758.     skip_bits_long(s, 0);
  759. #endif
  760. }
       ^
  761. 
  762. static inline void align_get_bits(GetBitContext *s)

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

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

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

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