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

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

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

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

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

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

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

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

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

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

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

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

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