libavcodec/mpc7.c:180: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 179 could be null and is dereferenced by call to `skip_bits()` at line 180, 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.                             AVPacket *avpkt)

libavcodec/mpc7.c:161:5: 
159.                             AVPacket *avpkt)
160. {
161.     const uint8_t *buf = avpkt->data;
         ^
162.     int buf_size = avpkt->size;
163.     MPCContext *c = avctx->priv_data;

libavcodec/mpc7.c:162:5: 
160. {
161.     const uint8_t *buf = avpkt->data;
162.     int buf_size = avpkt->size;
         ^
163.     MPCContext *c = avctx->priv_data;
164.     GetBitContext gb;

libavcodec/mpc7.c:163:5: 
161.     const uint8_t *buf = avpkt->data;
162.     int buf_size = avpkt->size;
163.     MPCContext *c = avctx->priv_data;
         ^
164.     GetBitContext gb;
165.     uint8_t *bits;

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

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

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

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

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

libavcodec/mpc7.c:177:5: 
175.     }
176. 
177.     bits = av_malloc(((buf_size - 1) & ~3) + FF_INPUT_BUFFER_PADDING_SIZE);
         ^
178.     c->dsp.bswap_buf((uint32_t*)bits, (const uint32_t*)(buf + 4), (buf_size - 4) >> 2);
179.     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:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

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

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

libavcodec/get_bits.h:493:1: start of procedure init_get_bits()
  491.  * @param bit_size the size of the buffer in bits
  492.  */
  493. static inline void init_get_bits(GetBitContext *s,
       ^
  494.                    const uint8_t *buffer, int bit_size)
  495. {

libavcodec/get_bits.h:496:5: 
  494.                    const uint8_t *buffer, int bit_size)
  495. {
  496.     int buffer_size= (bit_size+7)>>3;
           ^
  497.     if(buffer_size < 0 || bit_size < 0) {
  498.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:497:8: Taking false branch
  495. {
  496.     int buffer_size= (bit_size+7)>>3;
  497.     if(buffer_size < 0 || bit_size < 0) {
              ^
  498.         buffer_size = bit_size = 0;
  499.         buffer = NULL;

libavcodec/get_bits.h:497:27: Taking false branch
  495. {
  496.     int buffer_size= (bit_size+7)>>3;
  497.     if(buffer_size < 0 || bit_size < 0) {
                                 ^
  498.         buffer_size = bit_size = 0;
  499.         buffer = NULL;

libavcodec/get_bits.h:502:5: 
  500.     }
  501. 
  502.     s->buffer= buffer;
           ^
  503.     s->size_in_bits= bit_size;
  504.     s->buffer_end= buffer + buffer_size;

libavcodec/get_bits.h:503:5: 
  501. 
  502.     s->buffer= buffer;
  503.     s->size_in_bits= bit_size;
           ^
  504.     s->buffer_end= buffer + buffer_size;
  505. #ifdef ALT_BITSTREAM_READER

libavcodec/get_bits.h:504:5: 
  502.     s->buffer= buffer;
  503.     s->size_in_bits= bit_size;
  504.     s->buffer_end= buffer + buffer_size;
           ^
  505. #ifdef ALT_BITSTREAM_READER
  506.     s->index=0;

libavcodec/get_bits.h:506:5: 
  504.     s->buffer_end= buffer + buffer_size;
  505. #ifdef ALT_BITSTREAM_READER
  506.     s->index=0;
           ^
  507. #elif defined LIBMPEG2_BITSTREAM_READER
  508.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/get_bits.h:516:1: return from a call to init_get_bits
  514.     skip_bits_long(s, 0);
  515. #endif
  516. }
       ^
  517. 
  518. static inline void align_get_bits(GetBitContext *s)

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

libavcodec/get_bits.h:408:1: start of procedure skip_bits()
  406. }
  407. 
  408. static inline void skip_bits(GetBitContext *s, int n){
       ^
  409.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
  410.     OPEN_READER(re, s)

libavcodec/get_bits.h:410:5: 
  408. static inline void skip_bits(GetBitContext *s, int n){
  409.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
  410.     OPEN_READER(re, s)
           ^
  411.     UPDATE_CACHE(re, s)
  412.     LAST_SKIP_BITS(re, s, n)

libavcodec/get_bits.h:411:5: 
  409.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
  410.     OPEN_READER(re, s)
  411.     UPDATE_CACHE(re, s)
           ^
  412.     LAST_SKIP_BITS(re, s, n)
  413.     CLOSE_READER(re, s)
