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

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

libavcodec/mpc7.c:46:5: 
44. {
45.     int i, j;
46.     MPCContext *c = avctx->priv_data;
        ^
47.     GetBitContext gb;
48.     uint8_t buf[16];

libavcodec/mpc7.c:49:5: 
47.     GetBitContext gb;
48.     uint8_t buf[16];
49.     static int vlc_initialized = 0;
        ^
50. 
51.     if(avctx->extradata_size < 16){

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

libavcodec/mpc7.c:55:5: 
53.         return -1;
54.     }
55.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
        ^
56.     av_random_init(&c->rnd, 0xDEADBEEF);
57.     dsputil_init(&c->dsp, avctx);

libavcodec/mpc7.c:56:5: 
54.     }
55.     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
56.     av_random_init(&c->rnd, 0xDEADBEEF);
        ^
57.     dsputil_init(&c->dsp, avctx);
58.     c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);

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

libavcodec/mpc7.c:58:5: Skipping __function_pointer__(): unresolved function pointer
56.     av_random_init(&c->rnd, 0xDEADBEEF);
57.     dsputil_init(&c->dsp, avctx);
58.     c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);
        ^
59.     ff_mpc_init();
60.     init_get_bits(&gb, buf, 128);

libavcodec/mpc7.c:59:5: 
57.     dsputil_init(&c->dsp, avctx);
58.     c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);
59.     ff_mpc_init();
        ^
60.     init_get_bits(&gb, buf, 128);
61. 

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

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

libavcodec/bitstream.h:665:1: start of procedure get_bits1()
  663. }
  664. 
  665. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  666. #ifdef ALT_BITSTREAM_READER
  667.     int index= s->index;

libavcodec/bitstream.h:667:5: 
  665. static inline unsigned int get_bits1(GetBitContext *s){
  666. #ifdef ALT_BITSTREAM_READER
  667.     int index= s->index;
           ^
  668.     uint8_t result= s->buffer[ index>>3 ];
  669. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/bitstream.h:668:5: 
  666. #ifdef ALT_BITSTREAM_READER
  667.     int index= s->index;
  668.     uint8_t result= s->buffer[ index>>3 ];
           ^
  669. #ifdef ALT_BITSTREAM_READER_LE
  670.     result>>= (index&0x07);
