libavcodec/mlp_parser.c:113: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 111 could be null and is dereferenced by call to `get_bits_long()` at line 113, column 9.

libavcodec/mlp_parser.c:93:1: start of procedure ff_mlp_read_major_sync()
91.  */
92. 
93. int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, const uint8_t *buf,
    ^
94.                            unsigned int buf_size)
95. {

libavcodec/mlp_parser.c:100:9: Taking false branch
 98.     uint16_t checksum;
 99. 
100.     if (buf_size < 28) {
             ^
101.         av_log(log, AV_LOG_ERROR, "Packet too short, unable to read major sync\n");
102.         return -1;

libavcodec/mlp_parser.c:105:5: 
103.     }
104. 
105.     checksum = mlp_checksum16(buf, 26);
         ^
106.     if (checksum != AV_RL16(buf+26)) {
107.         av_log(log, AV_LOG_ERROR, "Major sync info header checksum error\n");

libavcodec/mlp_parser.c:74:1: start of procedure mlp_checksum16()
  72.  */
  73. 
  74. static uint16_t mlp_checksum16(const uint8_t *buf, unsigned int buf_size)
      ^
  75. {
  76.     uint16_t crc;

libavcodec/mlp_parser.c:78:10: Taking false branch
  76.     uint16_t crc;
  77. 
  78.     if (!crc_init) {
               ^
  79.         av_crc_init(crc_2D, 0, 16, 0x002D, sizeof(crc_2D));
  80.         crc_init = 1;

libavcodec/mlp_parser.c:83:5: 
  81.     }
  82. 
  83.     crc = av_crc(crc_2D, 0, buf, buf_size - 2);
          ^
  84.     crc ^= AV_RL16(buf + buf_size - 2);
  85.     return crc;

libavutil/crc.c:112:1: start of procedure av_crc()
    110.  * @see av_crc_init() "le" parameter
    111.  */
    112. uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length){
         ^
    113.     const uint8_t *end= buffer+length;
    114. 

libavutil/crc.c:113:5: 
    111.  */
    112. uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length){
    113.     const uint8_t *end= buffer+length;
             ^
    114. 
    115. #ifndef CONFIG_SMALL

libavutil/crc.c:116:9: Taking false branch
    114. 
    115. #ifndef CONFIG_SMALL
    116.     if(!ctx[256])
                 ^
    117.         while(buffer<end-3){
    118.             crc ^= le2me_32(*(const uint32_t*)buffer); buffer+=4;

libavutil/crc.c:125:11: Loop condition is false. Leaving loop
    123.         }
    124. #endif
    125.     while(buffer<end)
                   ^
    126.         crc = ctx[((uint8_t)crc) ^ *buffer++] ^ (crc >> 8);
    127. 

libavutil/crc.c:128:5: 
    126.         crc = ctx[((uint8_t)crc) ^ *buffer++] ^ (crc >> 8);
    127. 
    128.     return crc;
             ^
    129. }
    130. 

libavutil/crc.c:129:1: return from a call to av_crc
    127. 
    128.     return crc;
    129. }
         ^
    130. 
    131. #ifdef TEST

libavcodec/mlp_parser.c:84:5: 
  82. 
  83.     crc = av_crc(crc_2D, 0, buf, buf_size - 2);
  84.     crc ^= AV_RL16(buf + buf_size - 2);
          ^
  85.     return crc;
  86. }

libavcodec/mlp_parser.c:85:5: 
  83.     crc = av_crc(crc_2D, 0, buf, buf_size - 2);
  84.     crc ^= AV_RL16(buf + buf_size - 2);
  85.     return crc;
          ^
  86. }
  87. 

libavcodec/mlp_parser.c:86:1: return from a call to mlp_checksum16
  84.     crc ^= AV_RL16(buf + buf_size - 2);
  85.     return crc;
  86. }
      ^
  87. 
  88. /** Read a major sync info header - contains high level information about

libavcodec/mlp_parser.c:106:9: Taking false branch
104. 
105.     checksum = mlp_checksum16(buf, 26);
106.     if (checksum != AV_RL16(buf+26)) {
             ^
107.         av_log(log, AV_LOG_ERROR, "Major sync info header checksum error\n");
108.         return -1;

libavcodec/mlp_parser.c:111:5: 
109.     }
110. 
111.     init_get_bits(&gb, buf, buf_size * 8);
         ^
112. 
113.     if (get_bits_long(&gb, 24) != 0xf8726f) /* Sync words */

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/mlp_parser.c:113:9: 
111.     init_get_bits(&gb, buf, buf_size * 8);
112. 
113.     if (get_bits_long(&gb, 24) != 0xf8726f) /* Sync words */
             ^
114.         return -1;
115. 

libavcodec/bitstream.h:717:1: start of procedure get_bits_long()
  715.  * reads 0-32 bits.
  716.  */
  717. static inline unsigned int get_bits_long(GetBitContext *s, int n){
       ^
  718.     if(n<=17) return get_bits(s, n);
  719.     else{

libavcodec/bitstream.h:718:8: Taking true branch
  716.  */
  717. static inline unsigned int get_bits_long(GetBitContext *s, int n){
  718.     if(n<=17) return get_bits(s, n);
              ^
  719.     else{
  720. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/bitstream.h:718:15: 
  716.  */
  717. static inline unsigned int get_bits_long(GetBitContext *s, int n){
  718.     if(n<=17) return get_bits(s, n);
                     ^
  719.     else{
  720. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/bitstream.h:655:1: start of procedure get_bits()
    653.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
    654.  */
    655. static inline unsigned int get_bits(GetBitContext *s, int n){
         ^
    656.     register int tmp;
    657.     OPEN_READER(re, s)

libavcodec/bitstream.h:657:5: 
    655. static inline unsigned int get_bits(GetBitContext *s, int n){
    656.     register int tmp;
    657.     OPEN_READER(re, s)
             ^
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:658:5: 
    656.     register int tmp;
    657.     OPEN_READER(re, s)
    658.     UPDATE_CACHE(re, s)
             ^
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)
