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

libavcodec/mpc8.c:181:1: start of procedure mpc8_decode_frame()
179. }
180. 
181. static int mpc8_decode_frame(AVCodecContext * avctx,
     ^
182.                             void *data, int *data_size,
183.                             AVPacket *avpkt)

libavcodec/mpc8.c:185:5: 
183.                             AVPacket *avpkt)
184. {
185.     const uint8_t *buf = avpkt->data;
         ^
186.     int buf_size = avpkt->size;
187.     MPCContext *c = avctx->priv_data;

libavcodec/mpc8.c:186:5: 
184. {
185.     const uint8_t *buf = avpkt->data;
186.     int buf_size = avpkt->size;
         ^
187.     MPCContext *c = avctx->priv_data;
188.     GetBitContext gb2, *gb = &gb2;

libavcodec/mpc8.c:187:5: 
185.     const uint8_t *buf = avpkt->data;
186.     int buf_size = avpkt->size;
187.     MPCContext *c = avctx->priv_data;
         ^
188.     GetBitContext gb2, *gb = &gb2;
189.     int i, j, k, ch, cnt, res, t;

libavcodec/mpc8.c:188:5: 
186.     int buf_size = avpkt->size;
187.     MPCContext *c = avctx->priv_data;
188.     GetBitContext gb2, *gb = &gb2;
         ^
189.     int i, j, k, ch, cnt, res, t;
190.     Band *bands = c->bands;

libavcodec/mpc8.c:190:5: 
188.     GetBitContext gb2, *gb = &gb2;
189.     int i, j, k, ch, cnt, res, t;
190.     Band *bands = c->bands;
         ^
191.     int off;
192.     int maxband, keyframe;

libavcodec/mpc8.c:195:16: Condition is false
193.     int last[2];
194. 
195.     keyframe = c->cur_frame == 0;
                    ^
196. 
197.     if(keyframe){

libavcodec/mpc8.c:195:5: 
193.     int last[2];
194. 
195.     keyframe = c->cur_frame == 0;
         ^
196. 
197.     if(keyframe){

libavcodec/mpc8.c:197:8: Taking false branch
195.     keyframe = c->cur_frame == 0;
196. 
197.     if(keyframe){
            ^
198.         memset(c->Q, 0, sizeof(c->Q));
199.         c->last_bits_used = 0;

libavcodec/mpc8.c:201:5: 
199.         c->last_bits_used = 0;
200.     }
201.     init_get_bits(gb, buf, buf_size * 8);
         ^
202.     skip_bits(gb, c->last_bits_used & 7);
203. 

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 true 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:498:9: 
  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;
  500.     }

libavcodec/get_bits.h:499:9: 
  497.     if(buffer_size < 0 || bit_size < 0) {
  498.         buffer_size = bit_size = 0;
  499.         buffer = NULL;
               ^
  500.     }
  501. 

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/mpc8.c:202:5: 
200.     }
201.     init_get_bits(gb, buf, buf_size * 8);
202.     skip_bits(gb, c->last_bits_used & 7);
         ^
203. 
204.     if(keyframe)

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)
