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

libavcodec/mpc7.c:47:1: start of procedure mpc7_decode_init()
45. static VLC scfi_vlc, dscf_vlc, hdr_vlc, quant_vlc[MPC7_QUANT_VLC_TABLES][2];
46. 
47. static av_cold int mpc7_decode_init(AVCodecContext * avctx)
    ^
48. {
49.     int i, j;

libavcodec/mpc7.c:50:5: 
48. {
49.     int i, j;
50.     MPCContext *c = avctx->priv_data;
        ^
51.     GetBitContext gb;
52.     uint8_t buf[16];

libavcodec/mpc7.c:53:5: 
51.     GetBitContext gb;
52.     uint8_t buf[16];
53.     static int vlc_initialized = 0;
        ^
54. 
55.     if(avctx->extradata_size < 16){

libavcodec/mpc7.c:55:8: Taking false branch
53.     static int vlc_initialized = 0;
54. 
55.     if(avctx->extradata_size < 16){
           ^
56.         av_log(avctx, AV_LOG_ERROR, "Too small extradata size (%i)!\n", avctx->extradata_size);
57.         return -1;

libavcodec/mpc7.c:59:5: 
57.         return -1;
58.     }
59.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
        ^
60.     av_init_random(0xDEADBEEF, &c->rnd);
61.     dsputil_init(&c->dsp, avctx);

libavcodec/mpc7.c:60:5: 
58.     }
59.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
60.     av_init_random(0xDEADBEEF, &c->rnd);
        ^
61.     dsputil_init(&c->dsp, avctx);
62.     c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);

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/mpc7.c:61:5: Skipping dsputil_init(): empty list of specs
59.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
60.     av_init_random(0xDEADBEEF, &c->rnd);
61.     dsputil_init(&c->dsp, avctx);
        ^
62.     c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);
63.     ff_mpc_init();

libavcodec/mpc7.c:62:5: Skipping __function_pointer__(): unresolved function pointer
60.     av_init_random(0xDEADBEEF, &c->rnd);
61.     dsputil_init(&c->dsp, avctx);
62.     c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);
        ^
63.     ff_mpc_init();
64.     init_get_bits(&gb, buf, 128);

libavcodec/mpc7.c:63:5: 
61.     dsputil_init(&c->dsp, avctx);
62.     c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);
63.     ff_mpc_init();
        ^
64.     init_get_bits(&gb, buf, 128);
65. 

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/mpc7.c:64:5: 
62.     c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);
63.     ff_mpc_init();
64.     init_get_bits(&gb, buf, 128);
        ^
65. 
66.     c->IS = get_bits1(&gb);

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/mpc7.c:66:5: 
64.     init_get_bits(&gb, buf, 128);
65. 
66.     c->IS = get_bits1(&gb);
        ^
67.     c->MSS = get_bits1(&gb);
68.     c->maxbands = get_bits(&gb, 6);

libavcodec/bitstream.h:686:1: start of procedure get_bits1()
  684. }
  685. 
  686. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  687. #ifdef ALT_BITSTREAM_READER
  688.     int index= s->index;

libavcodec/bitstream.h:688:5: 
  686. static inline unsigned int get_bits1(GetBitContext *s){
  687. #ifdef ALT_BITSTREAM_READER
  688.     int index= s->index;
           ^
  689.     uint8_t result= s->buffer[ index>>3 ];
  690. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/bitstream.h:689:5: 
  687. #ifdef ALT_BITSTREAM_READER
  688.     int index= s->index;
  689.     uint8_t result= s->buffer[ index>>3 ];
           ^
  690. #ifdef ALT_BITSTREAM_READER_LE
  691.     result>>= (index&0x07);
