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

libavcodec/smacker.c:283:1: start of procedure decode_header_trees()
281. }
282. 
283. static int decode_header_trees(SmackVContext *smk) {
     ^
284.     GetBitContext gb;
285.     int mmap_size, mclr_size, full_size, type_size;

libavcodec/smacker.c:287:5: 
285.     int mmap_size, mclr_size, full_size, type_size;
286. 
287.     mmap_size = AV_RL32(smk->avctx->extradata);
         ^
288.     mclr_size = AV_RL32(smk->avctx->extradata + 4);
289.     full_size = AV_RL32(smk->avctx->extradata + 8);

libavcodec/smacker.c:288:5: 
286. 
287.     mmap_size = AV_RL32(smk->avctx->extradata);
288.     mclr_size = AV_RL32(smk->avctx->extradata + 4);
         ^
289.     full_size = AV_RL32(smk->avctx->extradata + 8);
290.     type_size = AV_RL32(smk->avctx->extradata + 12);

libavcodec/smacker.c:289:5: 
287.     mmap_size = AV_RL32(smk->avctx->extradata);
288.     mclr_size = AV_RL32(smk->avctx->extradata + 4);
289.     full_size = AV_RL32(smk->avctx->extradata + 8);
         ^
290.     type_size = AV_RL32(smk->avctx->extradata + 12);
291. 

libavcodec/smacker.c:290:5: 
288.     mclr_size = AV_RL32(smk->avctx->extradata + 4);
289.     full_size = AV_RL32(smk->avctx->extradata + 8);
290.     type_size = AV_RL32(smk->avctx->extradata + 12);
         ^
291. 
292.     init_get_bits(&gb, smk->avctx->extradata + 16, (smk->avctx->extradata_size - 16) * 8);

libavcodec/smacker.c:292:5: 
290.     type_size = AV_RL32(smk->avctx->extradata + 12);
291. 
292.     init_get_bits(&gb, smk->avctx->extradata + 16, (smk->avctx->extradata_size - 16) * 8);
         ^
293. 
294.     if(!get_bits1(&gb)) {

libavcodec/get_bits.h:339:1: start of procedure init_get_bits()
  337.  * @param bit_size the size of the buffer in bits
  338.  */
  339. static inline void init_get_bits(GetBitContext *s, const uint8_t *buffer,
       ^
  340.                                  int bit_size)
  341. {

libavcodec/get_bits.h:342:5: 
  340.                                  int bit_size)
  341. {
  342.     int buffer_size = (bit_size+7)>>3;
           ^
  343.     if (buffer_size < 0 || bit_size < 0) {
  344.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:343:9: Taking true branch
  341. {
  342.     int buffer_size = (bit_size+7)>>3;
  343.     if (buffer_size < 0 || bit_size < 0) {
               ^
  344.         buffer_size = bit_size = 0;
  345.         buffer = NULL;

libavcodec/get_bits.h:344:9: 
  342.     int buffer_size = (bit_size+7)>>3;
  343.     if (buffer_size < 0 || bit_size < 0) {
  344.         buffer_size = bit_size = 0;
               ^
  345.         buffer = NULL;
  346.     }

libavcodec/get_bits.h:345:9: 
  343.     if (buffer_size < 0 || bit_size < 0) {
  344.         buffer_size = bit_size = 0;
  345.         buffer = NULL;
               ^
  346.     }
  347. 

libavcodec/get_bits.h:348:5: 
  346.     }
  347. 
  348.     s->buffer       = buffer;
           ^
  349.     s->size_in_bits = bit_size;
  350. #if !UNCHECKED_BITSTREAM_READER

libavcodec/get_bits.h:349:5: 
  347. 
  348.     s->buffer       = buffer;
  349.     s->size_in_bits = bit_size;
           ^
  350. #if !UNCHECKED_BITSTREAM_READER
  351.     s->size_in_bits_plus8 = bit_size + 8;

libavcodec/get_bits.h:351:5: 
  349.     s->size_in_bits = bit_size;
  350. #if !UNCHECKED_BITSTREAM_READER
  351.     s->size_in_bits_plus8 = bit_size + 8;
           ^
  352. #endif
  353.     s->buffer_end   = buffer + buffer_size;

libavcodec/get_bits.h:353:5: 
  351.     s->size_in_bits_plus8 = bit_size + 8;
  352. #endif
  353.     s->buffer_end   = buffer + buffer_size;
           ^
  354.     s->index        = 0;
  355. }

libavcodec/get_bits.h:354:5: 
  352. #endif
  353.     s->buffer_end   = buffer + buffer_size;
  354.     s->index        = 0;
           ^
  355. }
  356. 

libavcodec/get_bits.h:355:1: return from a call to init_get_bits
  353.     s->buffer_end   = buffer + buffer_size;
  354.     s->index        = 0;
  355. }
       ^
  356. 
  357. static inline void align_get_bits(GetBitContext *s)

libavcodec/smacker.c:294:9: 
292.     init_get_bits(&gb, smk->avctx->extradata + 16, (smk->avctx->extradata_size - 16) * 8);
293. 
294.     if(!get_bits1(&gb)) {
             ^
295.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MMAP tree\n");
296.         smk->mmap_tbl = av_malloc(sizeof(int) * 2);

libavcodec/get_bits.h:255:1: start of procedure get_bits1()
  253. }
  254. 
  255. static inline unsigned int get_bits1(GetBitContext *s)
       ^
  256. {
  257.     unsigned int index = s->index;

libavcodec/get_bits.h:257:5: 
  255. static inline unsigned int get_bits1(GetBitContext *s)
  256. {
  257.     unsigned int index = s->index;
           ^
  258.     uint8_t result = s->buffer[index>>3];
  259. #ifdef BITSTREAM_READER_LE

libavcodec/get_bits.h:258:5: 
  256. {
  257.     unsigned int index = s->index;
  258.     uint8_t result = s->buffer[index>>3];
           ^
  259. #ifdef BITSTREAM_READER_LE
  260.     result >>= index & 7;
