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

libavformat/rdt.c:186:1: start of procedure ff_rdt_parse_header()
184.  */
185. 
186. int
     ^
187. ff_rdt_parse_header(const uint8_t *buf, int len,
188.                     int *pset_id, int *pseq_no, int *pstream_id,

libavformat/rdt.c:192:5: 
190. {
191.     GetBitContext gb;
192.     int consumed = 0, set_id, seq_no, stream_id, is_keyframe,
         ^
193.         len_included, need_reliable;
194.     uint32_t timestamp;

libavformat/rdt.c:197:12: Loop condition is true. Entering loop body
195. 
196.     /* skip status packets */
197.     while (len >= 5 && buf[1] == 0xFF /* status packet */) {
                ^
198.         int pkt_len;
199. 

libavformat/rdt.c:197:24: Loop condition is true. Entering loop body
195. 
196.     /* skip status packets */
197.     while (len >= 5 && buf[1] == 0xFF /* status packet */) {
                            ^
198.         int pkt_len;
199. 

libavformat/rdt.c:200:15: Taking false branch
198.         int pkt_len;
199. 
200.         if (!(buf[0] & 0x80))
                   ^
201.             return -1; /* not followed by a data packet */
202. 

libavformat/rdt.c:203:9: 
201.             return -1; /* not followed by a data packet */
202. 
203.         pkt_len = AV_RB16(buf+3);
             ^
204.         buf += pkt_len;
205.         len -= pkt_len;

libavformat/rdt.c:204:9: 
202. 
203.         pkt_len = AV_RB16(buf+3);
204.         buf += pkt_len;
             ^
205.         len -= pkt_len;
206.         consumed += pkt_len;

libavformat/rdt.c:205:9: 
203.         pkt_len = AV_RB16(buf+3);
204.         buf += pkt_len;
205.         len -= pkt_len;
             ^
206.         consumed += pkt_len;
207.     }

libavformat/rdt.c:206:9: 
204.         buf += pkt_len;
205.         len -= pkt_len;
206.         consumed += pkt_len;
             ^
207.     }
208.     if (len < 16)

libavformat/rdt.c:197:12: Loop condition is true. Entering loop body
195. 
196.     /* skip status packets */
197.     while (len >= 5 && buf[1] == 0xFF /* status packet */) {
                ^
198.         int pkt_len;
199. 

libavformat/rdt.c:197:24: Loop condition is true. Entering loop body
195. 
196.     /* skip status packets */
197.     while (len >= 5 && buf[1] == 0xFF /* status packet */) {
                            ^
198.         int pkt_len;
199. 

libavformat/rdt.c:200:15: Taking false branch
198.         int pkt_len;
199. 
200.         if (!(buf[0] & 0x80))
                   ^
201.             return -1; /* not followed by a data packet */
202. 

libavformat/rdt.c:203:9: 
201.             return -1; /* not followed by a data packet */
202. 
203.         pkt_len = AV_RB16(buf+3);
             ^
204.         buf += pkt_len;
205.         len -= pkt_len;

libavformat/rdt.c:204:9: 
202. 
203.         pkt_len = AV_RB16(buf+3);
204.         buf += pkt_len;
             ^
205.         len -= pkt_len;
206.         consumed += pkt_len;

libavformat/rdt.c:205:9: 
203.         pkt_len = AV_RB16(buf+3);
204.         buf += pkt_len;
205.         len -= pkt_len;
             ^
206.         consumed += pkt_len;
207.     }

libavformat/rdt.c:206:9: 
204.         buf += pkt_len;
205.         len -= pkt_len;
206.         consumed += pkt_len;
             ^
207.     }
208.     if (len < 16)

libavformat/rdt.c:197:12: Loop condition is true. Entering loop body
195. 
196.     /* skip status packets */
197.     while (len >= 5 && buf[1] == 0xFF /* status packet */) {
                ^
198.         int pkt_len;
199. 

libavformat/rdt.c:197:24: Loop condition is false. Leaving loop
195. 
196.     /* skip status packets */
197.     while (len >= 5 && buf[1] == 0xFF /* status packet */) {
                            ^
198.         int pkt_len;
199. 

libavformat/rdt.c:208:9: Taking false branch
206.         consumed += pkt_len;
207.     }
208.     if (len < 16)
             ^
209.         return -1;
210.     /**

libavformat/rdt.c:261:5: 
259.      *     http://anonsvn.wireshark.org/viewvc/trunk/epan/dissectors/packet-rdt.c
260.      */
261.     init_get_bits(&gb, buf, len << 3);
         ^
262.     len_included  = get_bits1(&gb);
263.     need_reliable = get_bits1(&gb);

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/rdt.c:262:5: 
260.      */
261.     init_get_bits(&gb, buf, len << 3);
262.     len_included  = get_bits1(&gb);
         ^
263.     need_reliable = get_bits1(&gb);
264.     set_id        = get_bits(&gb, 5);

libavcodec/bitstream.h:673:1: start of procedure get_bits1()
  671. }
  672. 
  673. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  674. #ifdef ALT_BITSTREAM_READER
  675.     int index= s->index;

libavcodec/bitstream.h:675:5: 
  673. static inline unsigned int get_bits1(GetBitContext *s){
  674. #ifdef ALT_BITSTREAM_READER
  675.     int index= s->index;
           ^
  676.     uint8_t result= s->buffer[ index>>3 ];
  677. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/bitstream.h:676:5: 
  674. #ifdef ALT_BITSTREAM_READER
  675.     int index= s->index;
  676.     uint8_t result= s->buffer[ index>>3 ];
           ^
  677. #ifdef ALT_BITSTREAM_READER_LE
  678.     result>>= (index&0x07);
