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

libavcodec/smacker.c:275:1: start of procedure decode_header_trees()
273. }
274. 
275. static int decode_header_trees(SmackVContext *smk) {
     ^
276.     GetBitContext gb;
277.     int mmap_size, mclr_size, full_size, type_size;

libavcodec/smacker.c:279:5: 
277.     int mmap_size, mclr_size, full_size, type_size;
278. 
279.     mmap_size = AV_RL32(smk->avctx->extradata);
         ^
280.     mclr_size = AV_RL32(smk->avctx->extradata + 4);
281.     full_size = AV_RL32(smk->avctx->extradata + 8);

libavcodec/smacker.c:280:5: 
278. 
279.     mmap_size = AV_RL32(smk->avctx->extradata);
280.     mclr_size = AV_RL32(smk->avctx->extradata + 4);
         ^
281.     full_size = AV_RL32(smk->avctx->extradata + 8);
282.     type_size = AV_RL32(smk->avctx->extradata + 12);

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

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

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

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/smacker.c:286:9: 
284.     init_get_bits(&gb, smk->avctx->extradata + 16, (smk->avctx->extradata_size - 16) * 8);
285. 
286.     if(!get_bits1(&gb)) {
             ^
287.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MMAP tree\n");
288.         smk->mmap_tbl = av_malloc(sizeof(int) * 2);

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);
