libavcodec/xan.c:104: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 101 could be null and is dereferenced by call to `get_bits1()` at line 104, column 32.

libavcodec/xan.c:91:1: start of procedure xan_huffman_decode()
89. }
90. 
91. static int xan_huffman_decode(unsigned char *dest, const unsigned char *src,
    ^
92.     int dest_len)
93. {

libavcodec/xan.c:94:5: 
92.     int dest_len)
93. {
94.     unsigned char byte = *src++;
        ^
95.     unsigned char ival = byte + 0x16;
96.     const unsigned char * ptr = src + byte*2;

libavcodec/xan.c:95:5: 
93. {
94.     unsigned char byte = *src++;
95.     unsigned char ival = byte + 0x16;
        ^
96.     const unsigned char * ptr = src + byte*2;
97.     unsigned char val = ival;

libavcodec/xan.c:96:5: 
94.     unsigned char byte = *src++;
95.     unsigned char ival = byte + 0x16;
96.     const unsigned char * ptr = src + byte*2;
        ^
97.     unsigned char val = ival;
98.     unsigned char *dest_end = dest + dest_len;

libavcodec/xan.c:97:5: 
95.     unsigned char ival = byte + 0x16;
96.     const unsigned char * ptr = src + byte*2;
97.     unsigned char val = ival;
        ^
98.     unsigned char *dest_end = dest + dest_len;
99.     GetBitContext gb;

libavcodec/xan.c:98:5: 
 96.     const unsigned char * ptr = src + byte*2;
 97.     unsigned char val = ival;
 98.     unsigned char *dest_end = dest + dest_len;
         ^
 99.     GetBitContext gb;
100. 

libavcodec/xan.c:101:5: 
 99.     GetBitContext gb;
100. 
101.     init_get_bits(&gb, ptr, 0); // FIXME: no src size available
         ^
102. 
103.     while ( val != 0x16 ) {

libavcodec/get_bits.h:494:1: start of procedure init_get_bits()
  492.  * responsible for checking for the buffer end yourself (take advantage of the padding)!
  493.  */
  494. static inline void init_get_bits(GetBitContext *s,
       ^
  495.                    const uint8_t *buffer, int bit_size)
  496. {

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

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

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

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

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

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

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

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

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

libavcodec/xan.c:103:13: Loop condition is true. Entering loop body
101.     init_get_bits(&gb, ptr, 0); // FIXME: no src size available
102. 
103.     while ( val != 0x16 ) {
                 ^
104.         val = src[val - 0x17 + get_bits1(&gb) * byte];
105. 

libavcodec/xan.c:104:9: 
102. 
103.     while ( val != 0x16 ) {
104.         val = src[val - 0x17 + get_bits1(&gb) * byte];
             ^
105. 
106.         if ( val < 0x16 ) {

libavcodec/get_bits.h:414:1: start of procedure get_bits1()
  412. }
  413. 
  414. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  415. #ifdef ALT_BITSTREAM_READER
  416.     unsigned int index= s->index;

libavcodec/get_bits.h:416:5: 
  414. static inline unsigned int get_bits1(GetBitContext *s){
  415. #ifdef ALT_BITSTREAM_READER
  416.     unsigned int index= s->index;
           ^
  417.     uint8_t result= s->buffer[ index>>3 ];
  418. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:417:5: 
  415. #ifdef ALT_BITSTREAM_READER
  416.     unsigned int index= s->index;
  417.     uint8_t result= s->buffer[ index>>3 ];
           ^
  418. #ifdef ALT_BITSTREAM_READER_LE
  419.     result>>= (index&0x07);
