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

libavcodec/mlpdec.c:906:1: start of procedure read_access_unit()
904.  *  otherwise returns the number of bytes consumed. */
905. 
906. static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size,
     ^
907.                             AVPacket *avpkt)
908. {

libavcodec/mlpdec.c:909:5: 
907.                             AVPacket *avpkt)
908. {
909.     const uint8_t *buf = avpkt->data;
         ^
910.     int buf_size = avpkt->size;
911.     MLPDecodeContext *m = avctx->priv_data;

libavcodec/mlpdec.c:910:5: 
908. {
909.     const uint8_t *buf = avpkt->data;
910.     int buf_size = avpkt->size;
         ^
911.     MLPDecodeContext *m = avctx->priv_data;
912.     GetBitContext gb;

libavcodec/mlpdec.c:911:5: 
909.     const uint8_t *buf = avpkt->data;
910.     int buf_size = avpkt->size;
911.     MLPDecodeContext *m = avctx->priv_data;
         ^
912.     GetBitContext gb;
913.     unsigned int length, substr;

libavcodec/mlpdec.c:915:5: 
913.     unsigned int length, substr;
914.     unsigned int substream_start;
915.     unsigned int header_size = 4;
         ^
916.     unsigned int substr_header_size = 0;
917.     uint8_t substream_parity_present[MAX_SUBSTREAMS];

libavcodec/mlpdec.c:916:5: 
914.     unsigned int substream_start;
915.     unsigned int header_size = 4;
916.     unsigned int substr_header_size = 0;
         ^
917.     uint8_t substream_parity_present[MAX_SUBSTREAMS];
918.     uint16_t substream_data_len[MAX_SUBSTREAMS];

libavcodec/mlpdec.c:921:9: Taking false branch
919.     uint8_t parity_bits;
920. 
921.     if (buf_size < 4)
             ^
922.         return 0;
923. 

libavcodec/mlpdec.c:924:5: 
922.         return 0;
923. 
924.     length = (AV_RB16(buf) & 0xfff) * 2;
         ^
925. 
926.     if (length > buf_size)

libavcodec/mlpdec.c:926:9: Taking false branch
924.     length = (AV_RB16(buf) & 0xfff) * 2;
925. 
926.     if (length > buf_size)
             ^
927.         return -1;
928. 

libavcodec/mlpdec.c:929:5: 
927.         return -1;
928. 
929.     init_get_bits(&gb, (buf + 4), (length - 4) * 8);
         ^
930. 
931.     m->is_major_sync_unit = 0;

libavcodec/get_bits.h:493:1: start of procedure init_get_bits()
  491.  * @param bit_size the size of the buffer in bits
  492.  */
  493. static inline void init_get_bits(GetBitContext *s,
       ^
  494.                    const uint8_t *buffer, int bit_size)
  495. {

libavcodec/get_bits.h:496:5: 
  494.                    const uint8_t *buffer, int bit_size)
  495. {
  496.     int buffer_size= (bit_size+7)>>3;
           ^
  497.     if(buffer_size < 0 || bit_size < 0) {
  498.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:497:8: Taking true branch
  495. {
  496.     int buffer_size= (bit_size+7)>>3;
  497.     if(buffer_size < 0 || bit_size < 0) {
              ^
  498.         buffer_size = bit_size = 0;
  499.         buffer = NULL;

libavcodec/get_bits.h:498:9: 
  496.     int buffer_size= (bit_size+7)>>3;
  497.     if(buffer_size < 0 || bit_size < 0) {
  498.         buffer_size = bit_size = 0;
               ^
  499.         buffer = NULL;
  500.     }

libavcodec/get_bits.h:499:9: 
  497.     if(buffer_size < 0 || bit_size < 0) {
  498.         buffer_size = bit_size = 0;
  499.         buffer = NULL;
               ^
  500.     }
  501. 

libavcodec/get_bits.h:502:5: 
  500.     }
  501. 
  502.     s->buffer= buffer;
           ^
  503.     s->size_in_bits= bit_size;
  504.     s->buffer_end= buffer + buffer_size;

libavcodec/get_bits.h:503:5: 
  501. 
  502.     s->buffer= buffer;
  503.     s->size_in_bits= bit_size;
           ^
  504.     s->buffer_end= buffer + buffer_size;
  505. #ifdef ALT_BITSTREAM_READER

libavcodec/get_bits.h:504:5: 
  502.     s->buffer= buffer;
  503.     s->size_in_bits= bit_size;
  504.     s->buffer_end= buffer + buffer_size;
           ^
  505. #ifdef ALT_BITSTREAM_READER
  506.     s->index=0;

libavcodec/get_bits.h:506:5: 
  504.     s->buffer_end= buffer + buffer_size;
  505. #ifdef ALT_BITSTREAM_READER
  506.     s->index=0;
           ^
  507. #elif defined LIBMPEG2_BITSTREAM_READER
  508.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/get_bits.h:516:1: return from a call to init_get_bits
  514.     skip_bits_long(s, 0);
  515. #endif
  516. }
       ^
  517. 
  518. static inline void align_get_bits(GetBitContext *s)

libavcodec/mlpdec.c:931:5: 
929.     init_get_bits(&gb, (buf + 4), (length - 4) * 8);
930. 
931.     m->is_major_sync_unit = 0;
         ^
932.     if (show_bits_long(&gb, 31) == (0xf8726fba >> 1)) {
933.         if (read_major_sync(m, &gb) < 0)

libavcodec/mlpdec.c:932:9: 
930. 
931.     m->is_major_sync_unit = 0;
932.     if (show_bits_long(&gb, 31) == (0xf8726fba >> 1)) {
             ^
933.         if (read_major_sync(m, &gb) < 0)
934.             goto error;

libavcodec/get_bits.h:470:1: start of procedure show_bits_long()
  468.  * shows 0-32 bits.
  469.  */
  470. static inline unsigned int show_bits_long(GetBitContext *s, int n){
       ^
  471.     if(n<=17) return show_bits(s, n);
  472.     else{

libavcodec/get_bits.h:471:8: Taking true branch
  469.  */
  470. static inline unsigned int show_bits_long(GetBitContext *s, int n){
  471.     if(n<=17) return show_bits(s, n);
              ^
  472.     else{
  473.         GetBitContext gb= *s;

libavcodec/get_bits.h:471:15: 
  469.  */
  470. static inline unsigned int show_bits_long(GetBitContext *s, int n){
  471.     if(n<=17) return show_bits(s, n);
                     ^
  472.     else{
  473.         GetBitContext gb= *s;

libavcodec/get_bits.h:399:1: start of procedure show_bits()
    397.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
    398.  */
    399. static inline unsigned int show_bits(GetBitContext *s, int n){
         ^
    400.     register int tmp;
    401.     OPEN_READER(re, s)

libavcodec/get_bits.h:401:5: 
    399. static inline unsigned int show_bits(GetBitContext *s, int n){
    400.     register int tmp;
    401.     OPEN_READER(re, s)
             ^
    402.     UPDATE_CACHE(re, s)
    403.     tmp= SHOW_UBITS(re, s, n);

libavcodec/get_bits.h:402:5: 
    400.     register int tmp;
    401.     OPEN_READER(re, s)
    402.     UPDATE_CACHE(re, s)
             ^
    403.     tmp= SHOW_UBITS(re, s, n);
    404. //    CLOSE_READER(re, s)
