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

libavcodec/mpc8.c:95:1: start of procedure mpc8_decode_init()
93. }
94. 
95. static av_cold int mpc8_decode_init(AVCodecContext * avctx)
    ^
96. {
97.     int i;

libavcodec/mpc8.c:98:5: 
 96. {
 97.     int i;
 98.     MPCContext *c = avctx->priv_data;
         ^
 99.     GetBitContext gb;
100.     static int vlc_initialized = 0;

libavcodec/mpc8.c:100:5: 
 98.     MPCContext *c = avctx->priv_data;
 99.     GetBitContext gb;
100.     static int vlc_initialized = 0;
         ^
101. 
102.     if(avctx->extradata_size < 2){

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

libavcodec/mpc8.c:106:5: 
104.         return -1;
105.     }
106.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
         ^
107.     av_init_random(0xDEADBEEF, &c->rnd);
108.     dsputil_init(&c->dsp, avctx);

libavcodec/mpc8.c:107:5: 
105.     }
106.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
107.     av_init_random(0xDEADBEEF, &c->rnd);
         ^
108.     dsputil_init(&c->dsp, avctx);
109. 

libavutil/random.c:46:1: start of procedure av_init_random()
  44. 
  45. /** initializes mt[AV_RANDOM_N] with a seed */
  46. void av_init_random(unsigned int seed, AVRandomState *state)
      ^
  47. {
  48.     int index;

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

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

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

libavutil/random.c:59:9: 
  57.     state->mt[0] = seed & 0xffffffff;
  58.     for (index = 1; index < AV_RANDOM_N; index++) {
  59.         unsigned int prev= state->mt[index - 1];
              ^
  60.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;
  61.     }

libavutil/random.c:60:9: 
  58.     for (index = 1; index < AV_RANDOM_N; index++) {
  59.         unsigned int prev= state->mt[index - 1];
  60.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;
              ^
  61.     }
  62.     state->index= index; // will cause it to generate untempered numbers the first iteration

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

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

libavutil/random.c:62:5: 
  60.         state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff;
  61.     }
  62.     state->index= index; // will cause it to generate untempered numbers the first iteration
          ^
  63. }
  64. 

libavutil/random.c:63:1: return from a call to av_init_random
  61.     }
  62.     state->index= index; // will cause it to generate untempered numbers the first iteration
  63. }
      ^
  64. 
  65. /** generate AV_RANDOM_N words at one time (which will then be tempered later) (av_random calls this; you shouldn't) */

libavcodec/mpc8.c:108:5: Skipping dsputil_init(): empty list of specs
106.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
107.     av_init_random(0xDEADBEEF, &c->rnd);
108.     dsputil_init(&c->dsp, avctx);
         ^
109. 
110.     ff_mpc_init();

libavcodec/mpc8.c:110:5: 
108.     dsputil_init(&c->dsp, avctx);
109. 
110.     ff_mpc_init();
         ^
111. 
112.     init_get_bits(&gb, avctx->extradata, 16);

libavcodec/mpc.c:43:1: start of procedure ff_mpc_init()
  41. static DECLARE_ALIGNED_16(MPA_INT, mpa_window[512]);
  42. 
  43. void ff_mpc_init()
      ^
  44. {
  45.     ff_mpa_synth_init(mpa_window);

libavcodec/mpc.c:45:5: Skipping ff_mpa_synth_init(): empty list of specs
  43. void ff_mpc_init()
  44. {
  45.     ff_mpa_synth_init(mpa_window);
          ^
  46. }
  47. 

libavcodec/mpc.c:46:1: return from a call to ff_mpc_init
  44. {
  45.     ff_mpa_synth_init(mpa_window);
  46. }
      ^
  47. 
  48. /**

libavcodec/mpc8.c:112:5: 
110.     ff_mpc_init();
111. 
112.     init_get_bits(&gb, avctx->extradata, 16);
         ^
113. 
114.     skip_bits(&gb, 3);//sample rate

libavcodec/bitstream.h:758:1: start of procedure init_get_bits()
  756.  * @param bit_size the size of the buffer in bits
  757.  */
  758. static inline void init_get_bits(GetBitContext *s,
       ^
  759.                    const uint8_t *buffer, int bit_size)
  760. {

libavcodec/bitstream.h:761:5: 
  759.                    const uint8_t *buffer, int bit_size)
  760. {
  761.     int buffer_size= (bit_size+7)>>3;
           ^
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:762:8: Taking true branch
  760. {
  761.     int buffer_size= (bit_size+7)>>3;
  762.     if(buffer_size < 0 || bit_size < 0) {
              ^
  763.         buffer_size = bit_size = 0;
  764.         buffer = NULL;

libavcodec/bitstream.h:763:9: 
  761.     int buffer_size= (bit_size+7)>>3;
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;
               ^
  764.         buffer = NULL;
  765.     }

libavcodec/bitstream.h:764:9: 
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;
  764.         buffer = NULL;
               ^
  765.     }
  766. 

libavcodec/bitstream.h:767:5: 
  765.     }
  766. 
  767.     s->buffer= buffer;
           ^
  768.     s->size_in_bits= bit_size;
  769.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:768:5: 
  766. 
  767.     s->buffer= buffer;
  768.     s->size_in_bits= bit_size;
           ^
  769.     s->buffer_end= buffer + buffer_size;
  770. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:769:5: 
  767.     s->buffer= buffer;
  768.     s->size_in_bits= bit_size;
  769.     s->buffer_end= buffer + buffer_size;
           ^
  770. #ifdef ALT_BITSTREAM_READER
  771.     s->index=0;

libavcodec/bitstream.h:771:5: 
  769.     s->buffer_end= buffer + buffer_size;
  770. #ifdef ALT_BITSTREAM_READER
  771.     s->index=0;
           ^
  772. #elif defined LIBMPEG2_BITSTREAM_READER
  773.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:781:1: return from a call to init_get_bits
  779.     skip_bits_long(s, 0);
  780. #endif
  781. }
       ^
  782. 
  783. static inline void align_get_bits(GetBitContext *s)

libavcodec/mpc8.c:114:5: 
112.     init_get_bits(&gb, avctx->extradata, 16);
113. 
114.     skip_bits(&gb, 3);//sample rate
         ^
115.     c->maxbands = get_bits(&gb, 5) + 1;
116.     skip_bits(&gb, 4);//channels

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

libavcodec/bitstream.h:680:5: 
  678. static inline void skip_bits(GetBitContext *s, int n){
  679.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
  680.     OPEN_READER(re, s)
           ^
  681.     UPDATE_CACHE(re, s)
  682.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:681:5: 
  679.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
  680.     OPEN_READER(re, s)
  681.     UPDATE_CACHE(re, s)
           ^
  682.     LAST_SKIP_BITS(re, s, n)
  683.     CLOSE_READER(re, s)
