libavformat/oggparseflac.c:41: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 40 could be null and is dereferenced by call to `skip_bits1()` at line 41, column 5.

libavformat/oggparseflac.c:28:1: start of procedure flac_header()
26. #define FLAC_STREAMINFO_SIZE 0x22
27. 
28. static int
    ^
29. flac_header (AVFormatContext * s, int idx)
30. {

libavformat/oggparseflac.c:31:5: 
29. flac_header (AVFormatContext * s, int idx)
30. {
31.     struct ogg *ogg = s->priv_data;
        ^
32.     struct ogg_stream *os = ogg->streams + idx;
33.     AVStream *st = s->streams[idx];

libavformat/oggparseflac.c:32:5: 
30. {
31.     struct ogg *ogg = s->priv_data;
32.     struct ogg_stream *os = ogg->streams + idx;
        ^
33.     AVStream *st = s->streams[idx];
34.     GetBitContext gb;

libavformat/oggparseflac.c:33:5: 
31.     struct ogg *ogg = s->priv_data;
32.     struct ogg_stream *os = ogg->streams + idx;
33.     AVStream *st = s->streams[idx];
        ^
34.     GetBitContext gb;
35.     int mdt;

libavformat/oggparseflac.c:37:9: Taking false branch
35.     int mdt;
36. 
37.     if (os->buf[os->pstart] == 0xff)
            ^
38.         return 0;
39. 

libavformat/oggparseflac.c:40:5: 
38.         return 0;
39. 
40.     init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
        ^
41.     skip_bits1(&gb); /* metadata_last */
42.     mdt = get_bits(&gb, 7);

libavcodec/bitstream.h:745:1: start of procedure init_get_bits()
  743.  * @param bit_size the size of the buffer in bits
  744.  */
  745. static inline void init_get_bits(GetBitContext *s,
       ^
  746.                    const uint8_t *buffer, int bit_size)
  747. {

libavcodec/bitstream.h:748:5: 
  746.                    const uint8_t *buffer, int bit_size)
  747. {
  748.     int buffer_size= (bit_size+7)>>3;
           ^
  749.     if(buffer_size < 0 || bit_size < 0) {
  750.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:749:8: Taking true branch
  747. {
  748.     int buffer_size= (bit_size+7)>>3;
  749.     if(buffer_size < 0 || bit_size < 0) {
              ^
  750.         buffer_size = bit_size = 0;
  751.         buffer = NULL;

libavcodec/bitstream.h:750:9: 
  748.     int buffer_size= (bit_size+7)>>3;
  749.     if(buffer_size < 0 || bit_size < 0) {
  750.         buffer_size = bit_size = 0;
               ^
  751.         buffer = NULL;
  752.     }

libavcodec/bitstream.h:751:9: 
  749.     if(buffer_size < 0 || bit_size < 0) {
  750.         buffer_size = bit_size = 0;
  751.         buffer = NULL;
               ^
  752.     }
  753. 

libavcodec/bitstream.h:754:5: 
  752.     }
  753. 
  754.     s->buffer= buffer;
           ^
  755.     s->size_in_bits= bit_size;
  756.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:755:5: 
  753. 
  754.     s->buffer= buffer;
  755.     s->size_in_bits= bit_size;
           ^
  756.     s->buffer_end= buffer + buffer_size;
  757. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:756:5: 
  754.     s->buffer= buffer;
  755.     s->size_in_bits= bit_size;
  756.     s->buffer_end= buffer + buffer_size;
           ^
  757. #ifdef ALT_BITSTREAM_READER
  758.     s->index=0;

libavcodec/bitstream.h:758:5: 
  756.     s->buffer_end= buffer + buffer_size;
  757. #ifdef ALT_BITSTREAM_READER
  758.     s->index=0;
           ^
  759. #elif defined LIBMPEG2_BITSTREAM_READER
  760.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:768:1: return from a call to init_get_bits
  766.     skip_bits_long(s, 0);
  767. #endif
  768. }
       ^
  769. 
  770. static inline void align_get_bits(GetBitContext *s)

libavformat/oggparseflac.c:41:5: 
39. 
40.     init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
41.     skip_bits1(&gb); /* metadata_last */
        ^
42.     mdt = get_bits(&gb, 7);
43. 

libavcodec/bitstream.h:697:1: start of procedure skip_bits1()
  695. }
  696. 
  697. static inline void skip_bits1(GetBitContext *s){
       ^
  698.     skip_bits(s, 1);
  699. }

libavcodec/bitstream.h:698:5: 
  696. 
  697. static inline void skip_bits1(GetBitContext *s){
  698.     skip_bits(s, 1);
           ^
  699. }
  700. 

libavcodec/bitstream.h:665:1: start of procedure skip_bits()
    663. }
    664. 
    665. static inline void skip_bits(GetBitContext *s, int n){
         ^
    666.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
    667.     OPEN_READER(re, s)

libavcodec/bitstream.h:667:5: 
    665. static inline void skip_bits(GetBitContext *s, int n){
    666.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
    667.     OPEN_READER(re, s)
             ^
    668.     UPDATE_CACHE(re, s)
    669.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:668:5: 
    666.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
    667.     OPEN_READER(re, s)
    668.     UPDATE_CACHE(re, s)
             ^
    669.     LAST_SKIP_BITS(re, s, n)
    670.     CLOSE_READER(re, s)
