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

libavcodec/mpc8.c:91:1: start of procedure mpc8_decode_init()
89. }
90. 
91. static av_cold int mpc8_decode_init(AVCodecContext * avctx)
    ^
92. {
93.     int i;

libavcodec/mpc8.c:94:5: 
92. {
93.     int i;
94.     MPCContext *c = avctx->priv_data;
        ^
95.     GetBitContext gb;
96.     static int vlc_initialized = 0;

libavcodec/mpc8.c:96:5: 
94.     MPCContext *c = avctx->priv_data;
95.     GetBitContext gb;
96.     static int vlc_initialized = 0;
        ^
97. 
98.     if(avctx->extradata_size < 2){

libavcodec/mpc8.c:98:8: Taking false branch
 96.     static int vlc_initialized = 0;
 97. 
 98.     if(avctx->extradata_size < 2){
            ^
 99.         av_log(avctx, AV_LOG_ERROR, "Too small extradata size (%i)!\n", avctx->extradata_size);
100.         return -1;

libavcodec/mpc8.c:102:5: 
100.         return -1;
101.     }
102.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
         ^
103.     av_random_init(&c->rnd, 0xDEADBEEF);
104.     dsputil_init(&c->dsp, avctx);

libavcodec/mpc8.c:103:5: 
101.     }
102.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
103.     av_random_init(&c->rnd, 0xDEADBEEF);
         ^
104.     dsputil_init(&c->dsp, avctx);
105. 

libavutil/random.c:40:1: start of procedure av_random_init()
  38. 
  39. /** Initializes mt[AV_RANDOM_N] with a seed. */
  40. void av_random_init(AVRandomState *state, unsigned int seed)
      ^
  41. {
  42.     int index;

libavutil/random.c:51:5: 
  49.      /* In the previous versions, MSBs of the seed affect   */
  50.      /* only MSBs of the array mt[].                        */
  51.     state->mt[0] = seed & 0xffffffff;
          ^
  52.     for (index = 1; index < AV_RANDOM_N; index++) {
  53.         unsigned int prev= state->mt[index - 1];

libavutil/random.c:52:10: 
  50.      /* only MSBs of the array mt[].                        */
  51.     state->mt[0] = seed & 0xffffffff;
  52.     for (index = 1; index < AV_RANDOM_N; index++) {
               ^
  53.         unsigned int prev= state->mt[index - 1];
  54.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;

libavutil/random.c:52:21: Loop condition is true. Entering loop body
  50.      /* only MSBs of the array mt[].                        */
  51.     state->mt[0] = seed & 0xffffffff;
  52.     for (index = 1; index < AV_RANDOM_N; index++) {
                          ^
  53.         unsigned int prev= state->mt[index - 1];
  54.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;

libavutil/random.c:53:9: 
  51.     state->mt[0] = seed & 0xffffffff;
  52.     for (index = 1; index < AV_RANDOM_N; index++) {
  53.         unsigned int prev= state->mt[index - 1];
              ^
  54.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;
  55.     }

libavutil/random.c:54:9: 
  52.     for (index = 1; index < AV_RANDOM_N; index++) {
  53.         unsigned int prev= state->mt[index - 1];
  54.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;
              ^
  55.     }
  56.     state->index= index; // Will cause it to generate untempered numbers in the first iteration.

libavutil/random.c:52:42: 
  50.      /* only MSBs of the array mt[].                        */
  51.     state->mt[0] = seed & 0xffffffff;
  52.     for (index = 1; index < AV_RANDOM_N; index++) {
                                               ^
  53.         unsigned int prev= state->mt[index - 1];
  54.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;

libavutil/random.c:52:21: Loop condition is false. Leaving loop
  50.      /* only MSBs of the array mt[].                        */
  51.     state->mt[0] = seed & 0xffffffff;
  52.     for (index = 1; index < AV_RANDOM_N; index++) {
                          ^
  53.         unsigned int prev= state->mt[index - 1];
  54.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;

libavutil/random.c:56:5: 
  54.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;
  55.     }
  56.     state->index= index; // Will cause it to generate untempered numbers in the first iteration.
          ^
  57. }
  58. 

libavutil/random.c:57:1: return from a call to av_random_init
  55.     }
  56.     state->index= index; // Will cause it to generate untempered numbers in the first iteration.
  57. }
      ^
  58. 
  59. #if LIBAVUTIL_VERSION_MAJOR < 50

libavcodec/mpc8.c:104:5: Skipping dsputil_init(): empty list of specs
102.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
103.     av_random_init(&c->rnd, 0xDEADBEEF);
104.     dsputil_init(&c->dsp, avctx);
         ^
105. 
106.     ff_mpc_init();

libavcodec/mpc8.c:106:5: 
104.     dsputil_init(&c->dsp, avctx);
105. 
106.     ff_mpc_init();
         ^
107. 
108.     init_get_bits(&gb, avctx->extradata, 16);

libavcodec/mpc.c:39:1: start of procedure ff_mpc_init()
  37. static DECLARE_ALIGNED_16(MPA_INT, mpa_window[512]);
  38. 
  39. void ff_mpc_init(void)
      ^
  40. {
  41.     ff_mpa_synth_init(mpa_window);

libavcodec/mpc.c:41:5: Skipping ff_mpa_synth_init(): empty list of specs
  39. void ff_mpc_init(void)
  40. {
  41.     ff_mpa_synth_init(mpa_window);
          ^
  42. }
  43. 

libavcodec/mpc.c:42:1: return from a call to ff_mpc_init
  40. {
  41.     ff_mpa_synth_init(mpa_window);
  42. }
      ^
  43. 
  44. /**

libavcodec/mpc8.c:108:5: 
106.     ff_mpc_init();
107. 
108.     init_get_bits(&gb, avctx->extradata, 16);
         ^
109. 
110.     skip_bits(&gb, 3);//sample rate

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 true 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:742:9: 
  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;
  744.     }

libavcodec/bitstream.h:743:9: 
  741.     if(buffer_size < 0 || bit_size < 0) {
  742.         buffer_size = bit_size = 0;
  743.         buffer = NULL;
               ^
  744.     }
  745. 

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/mpc8.c:110:5: 
108.     init_get_bits(&gb, avctx->extradata, 16);
109. 
110.     skip_bits(&gb, 3);//sample rate
         ^
111.     c->maxbands = get_bits(&gb, 5) + 1;
112.     skip_bits(&gb, 4);//channels

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)
