libavcodec/smacker.c:293: error: Null Dereference
  pointer `smk->mmap_tbl` last assigned on line 292 could be null and is dereferenced at line 293, 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: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 false 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:343:28: Taking false 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: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: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: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;

libavcodec/get_bits.h:260:5: 
  258.     uint8_t result = s->buffer[index>>3];
  259. #ifdef BITSTREAM_READER_LE
  260.     result >>= index & 7;
           ^
  261.     result &= 1;
  262. #else

libavcodec/get_bits.h:261:5: 
  259. #ifdef BITSTREAM_READER_LE
  260.     result >>= index & 7;
  261.     result &= 1;
           ^
  262. #else
  263.     result <<= index & 7;

libavcodec/get_bits.h:267:9: Taking false branch
  265. #endif
  266. #if !UNCHECKED_BITSTREAM_READER
  267.     if (s->index < s->size_in_bits_plus8)
               ^
  268. #endif
  269.         index++;

libavcodec/get_bits.h:270:5: 
  268. #endif
  269.         index++;
  270.     s->index = index;
           ^
  271. 
  272.     return result;

libavcodec/get_bits.h:272:5: 
  270.     s->index = index;
  271. 
  272.     return result;
           ^
  273. }
  274. 

libavcodec/get_bits.h:273:1: return from a call to get_bits1
  271. 
  272.     return result;
  273. }
       ^
  274. 
  275. static inline unsigned int show_bits1(GetBitContext *s)

libavcodec/smacker.c:290:9: Taking true branch
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/smacker.c:291:9: Skipping av_log(): empty list of specs
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);
293.         smk->mmap_tbl[0] = 0;

libavcodec/smacker.c:292:9: 
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);
             ^
293.         smk->mmap_tbl[0] = 0;
294.         smk->mmap_last[0] = smk->mmap_last[1] = smk->mmap_last[2] = 1;

libavutil/mem.c:64:1: start of procedure av_malloc()
  62.    linker will do it automatically. */
  63. 
  64. void *av_malloc(size_t size)
      ^
  65. {
  66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
  64. void *av_malloc(size_t size)
  65. {
  66.     void *ptr = NULL;
          ^
  67. #if CONFIG_MEMALIGN_HACK
  68.     long diff;

libavutil/mem.c:72:8: Taking false branch
  70. 
  71.     /* let's disallow possible ambiguous cases */
  72.     if(size > (INT_MAX-32) )
             ^
  73.         return NULL;
  74. 

libavutil/mem.c:83:9: Taking true branch
  81.     ((char*)ptr)[-1]= diff;
  82. #elif HAVE_POSIX_MEMALIGN
  83.     if (posix_memalign(&ptr,32,size))
              ^
  84.         ptr = NULL;
  85. #elif HAVE_MEMALIGN

libavutil/mem.c:84:9: 
  82. #elif HAVE_POSIX_MEMALIGN
  83.     if (posix_memalign(&ptr,32,size))
  84.         ptr = NULL;
              ^
  85. #elif HAVE_MEMALIGN
  86.     ptr = memalign(32,size);

libavutil/mem.c:114:5: 
  112.     ptr = malloc(size);
  113. #endif
  114.     return ptr;
           ^
  115. }
  116. 

libavutil/mem.c:115:1: return from a call to av_malloc
  113. #endif
  114.     return ptr;
  115. }
       ^
  116. 
  117. void *av_realloc(void *ptr, size_t size)

libavcodec/smacker.c:293:9: 
291.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MMAP tree\n");
292.         smk->mmap_tbl = av_malloc(sizeof(int) * 2);
293.         smk->mmap_tbl[0] = 0;
             ^
294.         smk->mmap_last[0] = smk->mmap_last[1] = smk->mmap_last[2] = 1;
295.     } else {
