libavformat/mpegts.c:744: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 739 could be null and is dereferenced by call to `get_bits1()` at line 744, column 23.

libavformat/mpegts.c:731:1: start of procedure read_sl_header()
729. }
730. 
731. static int read_sl_header(PESContext *pes, SLConfigDescr *sl,
     ^
732.                           const uint8_t *buf, int buf_size)
733. {

libavformat/mpegts.c:735:5: 
733. {
734.     GetBitContext gb;
735.     int au_start_flag = 0, au_end_flag = 0, ocr_flag = 0, idle_flag = 0;
         ^
736.     int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0;
737.     int dts_flag = -1, cts_flag = -1;

libavformat/mpegts.c:736:5: 
734.     GetBitContext gb;
735.     int au_start_flag = 0, au_end_flag = 0, ocr_flag = 0, idle_flag = 0;
736.     int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0;
         ^
737.     int dts_flag = -1, cts_flag = -1;
738.     int64_t dts = AV_NOPTS_VALUE, cts = AV_NOPTS_VALUE;

libavformat/mpegts.c:737:5: 
735.     int au_start_flag = 0, au_end_flag = 0, ocr_flag = 0, idle_flag = 0;
736.     int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0;
737.     int dts_flag = -1, cts_flag = -1;
         ^
738.     int64_t dts = AV_NOPTS_VALUE, cts = AV_NOPTS_VALUE;
739.     init_get_bits(&gb, buf, buf_size * 8);

libavformat/mpegts.c:738:5: 
736.     int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0;
737.     int dts_flag = -1, cts_flag = -1;
738.     int64_t dts = AV_NOPTS_VALUE, cts = AV_NOPTS_VALUE;
         ^
739.     init_get_bits(&gb, buf, buf_size * 8);
740. 

libavformat/mpegts.c:739:5: 
737.     int dts_flag = -1, cts_flag = -1;
738.     int64_t dts = AV_NOPTS_VALUE, cts = AV_NOPTS_VALUE;
739.     init_get_bits(&gb, buf, buf_size * 8);
         ^
740. 
741.     if (sl->use_au_start)

libavcodec/get_bits.h:376:1: start of procedure init_get_bits()
  374.  * @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow.
  375.  */
  376. static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
       ^
  377.                                 int bit_size)
  378. {

libavcodec/get_bits.h:380:5: 
  378. {
  379.     int buffer_size;
  380.     int ret = 0;
           ^
  381. 
  382.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {

libavcodec/get_bits.h:382:9: Taking true branch
  380.     int ret = 0;
  381. 
  382.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
               ^
  383.         bit_size    = 0;
  384.         buffer      = NULL;

libavcodec/get_bits.h:383:9: 
  381. 
  382.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
  383.         bit_size    = 0;
               ^
  384.         buffer      = NULL;
  385.         ret         = AVERROR_INVALIDDATA;

libavcodec/get_bits.h:384:9: 
  382.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
  383.         bit_size    = 0;
  384.         buffer      = NULL;
               ^
  385.         ret         = AVERROR_INVALIDDATA;
  386.     }

libavcodec/get_bits.h:385:9: 
  383.         bit_size    = 0;
  384.         buffer      = NULL;
  385.         ret         = AVERROR_INVALIDDATA;
               ^
  386.     }
  387. 

libavcodec/get_bits.h:388:5: 
  386.     }
  387. 
  388.     buffer_size = (bit_size + 7) >> 3;
           ^
  389. 
  390.     s->buffer             = buffer;

libavcodec/get_bits.h:390:5: 
  388.     buffer_size = (bit_size + 7) >> 3;
  389. 
  390.     s->buffer             = buffer;
           ^
  391.     s->size_in_bits       = bit_size;
  392. #if !UNCHECKED_BITSTREAM_READER

libavcodec/get_bits.h:391:5: 
  389. 
  390.     s->buffer             = buffer;
  391.     s->size_in_bits       = bit_size;
           ^
  392. #if !UNCHECKED_BITSTREAM_READER
  393.     s->size_in_bits_plus8 = bit_size + 8;

libavcodec/get_bits.h:393:5: 
  391.     s->size_in_bits       = bit_size;
  392. #if !UNCHECKED_BITSTREAM_READER
  393.     s->size_in_bits_plus8 = bit_size + 8;
           ^
  394. #endif
  395.     s->buffer_end         = buffer + buffer_size;

libavcodec/get_bits.h:395:5: 
  393.     s->size_in_bits_plus8 = bit_size + 8;
  394. #endif
  395.     s->buffer_end         = buffer + buffer_size;
           ^
  396.     s->index              = 0;
  397. 

libavcodec/get_bits.h:396:5: 
  394. #endif
  395.     s->buffer_end         = buffer + buffer_size;
  396.     s->index              = 0;
           ^
  397. 
  398.     return ret;

libavcodec/get_bits.h:398:5: 
  396.     s->index              = 0;
  397. 
  398.     return ret;
           ^
  399. }
  400. 

libavcodec/get_bits.h:399:1: return from a call to init_get_bits
  397. 
  398.     return ret;
  399. }
       ^
  400. 
  401. /**

libavformat/mpegts.c:741:9: Taking false branch
739.     init_get_bits(&gb, buf, buf_size * 8);
740. 
741.     if (sl->use_au_start)
             ^
742.         au_start_flag = get_bits1(&gb);
743.     if (sl->use_au_end)

libavformat/mpegts.c:743:9: Taking true branch
741.     if (sl->use_au_start)
742.         au_start_flag = get_bits1(&gb);
743.     if (sl->use_au_end)
             ^
744.         au_end_flag = get_bits1(&gb);
745.     if (!sl->use_au_start && !sl->use_au_end)

libavformat/mpegts.c:744:9: 
742.         au_start_flag = get_bits1(&gb);
743.     if (sl->use_au_end)
744.         au_end_flag = get_bits1(&gb);
             ^
745.     if (!sl->use_au_start && !sl->use_au_end)
746.         au_start_flag = au_end_flag = 1;

libavcodec/get_bits.h:272:1: start of procedure get_bits1()
  270. }
  271. 
  272. static inline unsigned int get_bits1(GetBitContext *s)
       ^
  273. {
  274.     unsigned int index = s->index;

libavcodec/get_bits.h:274:5: 
  272. static inline unsigned int get_bits1(GetBitContext *s)
  273. {
  274.     unsigned int index = s->index;
           ^
  275.     uint8_t result     = s->buffer[index >> 3];
  276. #ifdef BITSTREAM_READER_LE

libavcodec/get_bits.h:275:5: 
  273. {
  274.     unsigned int index = s->index;
  275.     uint8_t result     = s->buffer[index >> 3];
           ^
  276. #ifdef BITSTREAM_READER_LE
  277.     result >>= index & 7;
