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

libavcodec/smacker.c:279:1: start of procedure decode_header_trees()
277. }
278. 
279. static int decode_header_trees(SmackVContext *smk) {
     ^
280.     GetBitContext gb;
281.     int mmap_size, mclr_size, full_size, type_size;

libavcodec/smacker.c:283:5: 
281.     int mmap_size, mclr_size, full_size, type_size;
282. 
283.     mmap_size = AV_RL32(smk->avctx->extradata);
         ^
284.     mclr_size = AV_RL32(smk->avctx->extradata + 4);
285.     full_size = AV_RL32(smk->avctx->extradata + 8);

libavcodec/smacker.c:284:5: 
282. 
283.     mmap_size = AV_RL32(smk->avctx->extradata);
284.     mclr_size = AV_RL32(smk->avctx->extradata + 4);
         ^
285.     full_size = AV_RL32(smk->avctx->extradata + 8);
286.     type_size = AV_RL32(smk->avctx->extradata + 12);

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

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

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

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

libavcodec/get_bits.h:346:5: 
  344.                                  int bit_size)
  345. {
  346.     int buffer_size = (bit_size+7)>>3;
           ^
  347.     if (buffer_size < 0 || bit_size < 0) {
  348.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:347:9: Taking true branch
  345. {
  346.     int buffer_size = (bit_size+7)>>3;
  347.     if (buffer_size < 0 || bit_size < 0) {
               ^
  348.         buffer_size = bit_size = 0;
  349.         buffer = NULL;

libavcodec/get_bits.h:348:9: 
  346.     int buffer_size = (bit_size+7)>>3;
  347.     if (buffer_size < 0 || bit_size < 0) {
  348.         buffer_size = bit_size = 0;
               ^
  349.         buffer = NULL;
  350.     }

libavcodec/get_bits.h:349:9: 
  347.     if (buffer_size < 0 || bit_size < 0) {
  348.         buffer_size = bit_size = 0;
  349.         buffer = NULL;
               ^
  350.     }
  351. 

libavcodec/get_bits.h:352:5: 
  350.     }
  351. 
  352.     s->buffer       = buffer;
           ^
  353.     s->size_in_bits = bit_size;
  354. #if !UNCHECKED_BITSTREAM_READER

libavcodec/get_bits.h:353:5: 
  351. 
  352.     s->buffer       = buffer;
  353.     s->size_in_bits = bit_size;
           ^
  354. #if !UNCHECKED_BITSTREAM_READER
  355.     s->size_in_bits_plus8 = bit_size + 8;

libavcodec/get_bits.h:355:5: 
  353.     s->size_in_bits = bit_size;
  354. #if !UNCHECKED_BITSTREAM_READER
  355.     s->size_in_bits_plus8 = bit_size + 8;
           ^
  356. #endif
  357.     s->buffer_end   = buffer + buffer_size;

libavcodec/get_bits.h:357:5: 
  355.     s->size_in_bits_plus8 = bit_size + 8;
  356. #endif
  357.     s->buffer_end   = buffer + buffer_size;
           ^
  358.     s->index        = 0;
  359. }

libavcodec/get_bits.h:358:5: 
  356. #endif
  357.     s->buffer_end   = buffer + buffer_size;
  358.     s->index        = 0;
           ^
  359. }
  360. 

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

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

libavcodec/get_bits.h:259:1: start of procedure get_bits1()
  257. }
  258. 
  259. static inline unsigned int get_bits1(GetBitContext *s)
       ^
  260. {
  261.     unsigned int index = s->index;

libavcodec/get_bits.h:261:5: 
  259. static inline unsigned int get_bits1(GetBitContext *s)
  260. {
  261.     unsigned int index = s->index;
           ^
  262.     uint8_t result = s->buffer[index>>3];
  263. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:262:5: 
  260. {
  261.     unsigned int index = s->index;
  262.     uint8_t result = s->buffer[index>>3];
           ^
  263. #ifdef ALT_BITSTREAM_READER_LE
  264.     result >>= index & 7;
