libavcodec/smacker.c:309: error: Null Dereference
  pointer `smk->full_tbl` last assigned on line 308 could be null and is dereferenced at line 309, column 9.

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

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

libavutil/ppc/intreadwrite.h:44:1: start of procedure AV_RL32()
  42. 
  43. #define AV_RL32 AV_RL32
  44. static av_always_inline uint32_t AV_RL32(const void *p)
      ^
  45. {
  46.     uint32_t v;

libavutil/ppc/intreadwrite.h:47:5: Skipping __infer_skip_gcc_asm_stmt(): function or method not found
  45. {
  46.     uint32_t v;
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
          ^
  48.     return v;
  49. }

libavutil/ppc/intreadwrite.h:48:5: 
  46.     uint32_t v;
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
  48.     return v;
          ^
  49. }
  50. 

libavutil/ppc/intreadwrite.h:49:1: return from a call to AV_RL32
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
  48.     return v;
  49. }
      ^
  50. 
  51. #define AV_WL32 AV_WL32

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

libavutil/ppc/intreadwrite.h:44:1: start of procedure AV_RL32()
  42. 
  43. #define AV_RL32 AV_RL32
  44. static av_always_inline uint32_t AV_RL32(const void *p)
      ^
  45. {
  46.     uint32_t v;

libavutil/ppc/intreadwrite.h:47:5: Skipping __infer_skip_gcc_asm_stmt(): function or method not found
  45. {
  46.     uint32_t v;
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
          ^
  48.     return v;
  49. }

libavutil/ppc/intreadwrite.h:48:5: 
  46.     uint32_t v;
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
  48.     return v;
          ^
  49. }
  50. 

libavutil/ppc/intreadwrite.h:49:1: return from a call to AV_RL32
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
  48.     return v;
  49. }
      ^
  50. 
  51. #define AV_WL32 AV_WL32

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

libavutil/ppc/intreadwrite.h:44:1: start of procedure AV_RL32()
  42. 
  43. #define AV_RL32 AV_RL32
  44. static av_always_inline uint32_t AV_RL32(const void *p)
      ^
  45. {
  46.     uint32_t v;

libavutil/ppc/intreadwrite.h:47:5: Skipping __infer_skip_gcc_asm_stmt(): function or method not found
  45. {
  46.     uint32_t v;
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
          ^
  48.     return v;
  49. }

libavutil/ppc/intreadwrite.h:48:5: 
  46.     uint32_t v;
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
  48.     return v;
          ^
  49. }
  50. 

libavutil/ppc/intreadwrite.h:49:1: return from a call to AV_RL32
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
  48.     return v;
  49. }
      ^
  50. 
  51. #define AV_WL32 AV_WL32

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

libavutil/ppc/intreadwrite.h:44:1: start of procedure AV_RL32()
  42. 
  43. #define AV_RL32 AV_RL32
  44. static av_always_inline uint32_t AV_RL32(const void *p)
      ^
  45. {
  46.     uint32_t v;

libavutil/ppc/intreadwrite.h:47:5: Skipping __infer_skip_gcc_asm_stmt(): function or method not found
  45. {
  46.     uint32_t v;
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
          ^
  48.     return v;
  49. }

libavutil/ppc/intreadwrite.h:48:5: 
  46.     uint32_t v;
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
  48.     return v;
          ^
  49. }
  50. 

libavutil/ppc/intreadwrite.h:49:1: return from a call to AV_RL32
  47.     __asm__ ("lwbrx   %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
  48.     return v;
  49. }
      ^
  50. 
  51. #define AV_WL32 AV_WL32

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

libavcodec/get_bits.h:375:1: start of procedure init_get_bits()
  373.  * @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow.
  374.  */
  375. static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
       ^
  376.                                 int bit_size)
  377. {

libavcodec/get_bits.h:379:5: 
  377. {
  378.     int buffer_size;
  379.     int ret = 0;
           ^
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {

libavcodec/get_bits.h:381:9: Taking false branch
  379.     int ret = 0;
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
               ^
  382.         buffer_size = bit_size = 0;
  383.         buffer      = NULL;

libavcodec/get_bits.h:381:35: Taking false branch
  379.     int ret = 0;
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
                                         ^
  382.         buffer_size = bit_size = 0;
  383.         buffer      = NULL;

libavcodec/get_bits.h:381:52: Taking false branch
  379.     int ret = 0;
  380. 
  381.     if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {
                                                          ^
  382.         buffer_size = bit_size = 0;
  383.         buffer      = NULL;

libavcodec/get_bits.h:387:5: 
  385.     }
  386. 
  387.     buffer_size = (bit_size + 7) >> 3;
           ^
  388. 
  389.     s->buffer             = buffer;

libavcodec/get_bits.h:389:5: 
  387.     buffer_size = (bit_size + 7) >> 3;
  388. 
  389.     s->buffer             = buffer;
           ^
  390.     s->size_in_bits       = bit_size;
  391. #if !UNCHECKED_BITSTREAM_READER

libavcodec/get_bits.h:390:5: 
  388. 
  389.     s->buffer             = buffer;
  390.     s->size_in_bits       = bit_size;
           ^
  391. #if !UNCHECKED_BITSTREAM_READER
  392.     s->size_in_bits_plus8 = bit_size + 8;

libavcodec/get_bits.h:392:5: 
  390.     s->size_in_bits       = bit_size;
  391. #if !UNCHECKED_BITSTREAM_READER
  392.     s->size_in_bits_plus8 = bit_size + 8;
           ^
  393. #endif
  394.     s->buffer_end         = buffer + buffer_size;

libavcodec/get_bits.h:394:5: 
  392.     s->size_in_bits_plus8 = bit_size + 8;
  393. #endif
  394.     s->buffer_end         = buffer + buffer_size;
           ^
  395.     s->index              = 0;
  396. 

libavcodec/get_bits.h:395:5: 
  393. #endif
  394.     s->buffer_end         = buffer + buffer_size;
  395.     s->index              = 0;
           ^
  396. 
  397.     return ret;

libavcodec/get_bits.h:397:5: 
  395.     s->index              = 0;
  396. 
  397.     return ret;
           ^
  398. }
  399. 

libavcodec/get_bits.h:398:1: return from a call to init_get_bits
  396. 
  397.     return ret;
  398. }
       ^
  399. 
  400. /**

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

libavcodec/get_bits.h:271:1: start of procedure get_bits1()
  269. }
  270. 
  271. static inline unsigned int get_bits1(GetBitContext *s)
       ^
  272. {
  273.     unsigned int index = s->index;

libavcodec/get_bits.h:273:5: 
  271. static inline unsigned int get_bits1(GetBitContext *s)
  272. {
  273.     unsigned int index = s->index;
           ^
  274.     uint8_t result     = s->buffer[index >> 3];
  275. #ifdef BITSTREAM_READER_LE

libavcodec/get_bits.h:274:5: 
  272. {
  273.     unsigned int index = s->index;
  274.     uint8_t result     = s->buffer[index >> 3];
           ^
  275. #ifdef BITSTREAM_READER_LE
  276.     result >>= index & 7;

libavcodec/get_bits.h:276:5: 
  274.     uint8_t result     = s->buffer[index >> 3];
  275. #ifdef BITSTREAM_READER_LE
  276.     result >>= index & 7;
           ^
  277.     result  &= 1;
  278. #else

libavcodec/get_bits.h:277:5: 
  275. #ifdef BITSTREAM_READER_LE
  276.     result >>= index & 7;
  277.     result  &= 1;
           ^
  278. #else
  279.     result <<= index & 7;

libavcodec/get_bits.h:283:9: Taking false branch
  281. #endif
  282. #if !UNCHECKED_BITSTREAM_READER
  283.     if (s->index < s->size_in_bits_plus8)
               ^
  284. #endif
  285.         index++;

libavcodec/get_bits.h:286:5: 
  284. #endif
  285.         index++;
  286.     s->index = index;
           ^
  287. 
  288.     return result;

libavcodec/get_bits.h:288:5: 
  286.     s->index = index;
  287. 
  288.     return result;
           ^
  289. }
  290. 

libavcodec/get_bits.h:289:1: return from a call to get_bits1
  287. 
  288.     return result;
  289. }
       ^
  290. 
  291. static inline unsigned int show_bits1(GetBitContext *s)

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

libavcodec/smacker.c:289:9: Skipping av_log(): empty list of specs
287. 
288.     if(!get_bits1(&gb)) {
289.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MMAP tree\n");
             ^
290.         smk->mmap_tbl = av_malloc(sizeof(int) * 2);
291.         smk->mmap_tbl[0] = 0;

libavcodec/smacker.c:290:9: 
288.     if(!get_bits1(&gb)) {
289.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MMAP tree\n");
290.         smk->mmap_tbl = av_malloc(sizeof(int) * 2);
             ^
291.         smk->mmap_tbl[0] = 0;
292.         smk->mmap_last[0] = smk->mmap_last[1] = smk->mmap_last[2] = 1;

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

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

libavutil/mem.c:69:9: Taking false branch
  67. 
  68.     /* let's disallow possibly ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
              ^
  70.         return NULL;
  71. 

libavutil/mem.c:69:35: Taking false branch
  67. 
  68.     /* let's disallow possibly ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
                                        ^
  70.         return NULL;
  71. 

libavutil/mem.c:80:9: Taking false branch
  78.     ((char *)ptr)[-1] = diff;
  79. #elif HAVE_POSIX_MEMALIGN
  80.     if (posix_memalign(&ptr, 32, size))
              ^
  81.         ptr = NULL;
  82. #elif HAVE_ALIGNED_MALLOC

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

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

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

libavcodec/smacker.c:292:9: 
290.         smk->mmap_tbl = av_malloc(sizeof(int) * 2);
291.         smk->mmap_tbl[0] = 0;
292.         smk->mmap_last[0] = smk->mmap_last[1] = smk->mmap_last[2] = 1;
             ^
293.     } else {
294.         if (smacker_decode_header_tree(smk, &gb, &smk->mmap_tbl, smk->mmap_last, mmap_size))

libavcodec/smacker.c:297:9: 
295.             return -1;
296.     }
297.     if(!get_bits1(&gb)) {
             ^
298.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MCLR tree\n");
299.         smk->mclr_tbl = av_malloc(sizeof(int) * 2);

libavcodec/get_bits.h:271:1: start of procedure get_bits1()
  269. }
  270. 
  271. static inline unsigned int get_bits1(GetBitContext *s)
       ^
  272. {
  273.     unsigned int index = s->index;

libavcodec/get_bits.h:273:5: 
  271. static inline unsigned int get_bits1(GetBitContext *s)
  272. {
  273.     unsigned int index = s->index;
           ^
  274.     uint8_t result     = s->buffer[index >> 3];
  275. #ifdef BITSTREAM_READER_LE

libavcodec/get_bits.h:274:5: 
  272. {
  273.     unsigned int index = s->index;
  274.     uint8_t result     = s->buffer[index >> 3];
           ^
  275. #ifdef BITSTREAM_READER_LE
  276.     result >>= index & 7;

libavcodec/get_bits.h:276:5: 
  274.     uint8_t result     = s->buffer[index >> 3];
  275. #ifdef BITSTREAM_READER_LE
  276.     result >>= index & 7;
           ^
  277.     result  &= 1;
  278. #else

libavcodec/get_bits.h:277:5: 
  275. #ifdef BITSTREAM_READER_LE
  276.     result >>= index & 7;
  277.     result  &= 1;
           ^
  278. #else
  279.     result <<= index & 7;

libavcodec/get_bits.h:283:9: Taking false branch
  281. #endif
  282. #if !UNCHECKED_BITSTREAM_READER
  283.     if (s->index < s->size_in_bits_plus8)
               ^
  284. #endif
  285.         index++;

libavcodec/get_bits.h:286:5: 
  284. #endif
  285.         index++;
  286.     s->index = index;
           ^
  287. 
  288.     return result;

libavcodec/get_bits.h:288:5: 
  286.     s->index = index;
  287. 
  288.     return result;
           ^
  289. }
  290. 

libavcodec/get_bits.h:289:1: return from a call to get_bits1
  287. 
  288.     return result;
  289. }
       ^
  290. 
  291. static inline unsigned int show_bits1(GetBitContext *s)

libavcodec/smacker.c:297:9: Taking true branch
295.             return -1;
296.     }
297.     if(!get_bits1(&gb)) {
             ^
298.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MCLR tree\n");
299.         smk->mclr_tbl = av_malloc(sizeof(int) * 2);

libavcodec/smacker.c:298:9: Skipping av_log(): empty list of specs
296.     }
297.     if(!get_bits1(&gb)) {
298.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MCLR tree\n");
             ^
299.         smk->mclr_tbl = av_malloc(sizeof(int) * 2);
300.         smk->mclr_tbl[0] = 0;

libavcodec/smacker.c:299:9: 
297.     if(!get_bits1(&gb)) {
298.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MCLR tree\n");
299.         smk->mclr_tbl = av_malloc(sizeof(int) * 2);
             ^
300.         smk->mclr_tbl[0] = 0;
301.         smk->mclr_last[0] = smk->mclr_last[1] = smk->mclr_last[2] = 1;

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

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

libavutil/mem.c:69:9: Taking false branch
  67. 
  68.     /* let's disallow possibly ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
              ^
  70.         return NULL;
  71. 

libavutil/mem.c:69:35: Taking false branch
  67. 
  68.     /* let's disallow possibly ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
                                        ^
  70.         return NULL;
  71. 

libavutil/mem.c:80:9: Taking false branch
  78.     ((char *)ptr)[-1] = diff;
  79. #elif HAVE_POSIX_MEMALIGN
  80.     if (posix_memalign(&ptr, 32, size))
              ^
  81.         ptr = NULL;
  82. #elif HAVE_ALIGNED_MALLOC

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

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

libavcodec/smacker.c:300:9: 
298.         av_log(smk->avctx, AV_LOG_INFO, "Skipping MCLR tree\n");
299.         smk->mclr_tbl = av_malloc(sizeof(int) * 2);
300.         smk->mclr_tbl[0] = 0;
             ^
301.         smk->mclr_last[0] = smk->mclr_last[1] = smk->mclr_last[2] = 1;
302.     } else {

libavcodec/smacker.c:301:9: 
299.         smk->mclr_tbl = av_malloc(sizeof(int) * 2);
300.         smk->mclr_tbl[0] = 0;
301.         smk->mclr_last[0] = smk->mclr_last[1] = smk->mclr_last[2] = 1;
             ^
302.     } else {
303.         if (smacker_decode_header_tree(smk, &gb, &smk->mclr_tbl, smk->mclr_last, mclr_size))

libavcodec/smacker.c:306:9: 
304.             return -1;
305.     }
306.     if(!get_bits1(&gb)) {
             ^
307.         av_log(smk->avctx, AV_LOG_INFO, "Skipping FULL tree\n");
308.         smk->full_tbl = av_malloc(sizeof(int) * 2);

libavcodec/get_bits.h:271:1: start of procedure get_bits1()
  269. }
  270. 
  271. static inline unsigned int get_bits1(GetBitContext *s)
       ^
  272. {
  273.     unsigned int index = s->index;

libavcodec/get_bits.h:273:5: 
  271. static inline unsigned int get_bits1(GetBitContext *s)
  272. {
  273.     unsigned int index = s->index;
           ^
  274.     uint8_t result     = s->buffer[index >> 3];
  275. #ifdef BITSTREAM_READER_LE

libavcodec/get_bits.h:274:5: 
  272. {
  273.     unsigned int index = s->index;
  274.     uint8_t result     = s->buffer[index >> 3];
           ^
  275. #ifdef BITSTREAM_READER_LE
  276.     result >>= index & 7;

libavcodec/get_bits.h:276:5: 
  274.     uint8_t result     = s->buffer[index >> 3];
  275. #ifdef BITSTREAM_READER_LE
  276.     result >>= index & 7;
           ^
  277.     result  &= 1;
  278. #else

libavcodec/get_bits.h:277:5: 
  275. #ifdef BITSTREAM_READER_LE
  276.     result >>= index & 7;
  277.     result  &= 1;
           ^
  278. #else
  279.     result <<= index & 7;

libavcodec/get_bits.h:283:9: Taking false branch
  281. #endif
  282. #if !UNCHECKED_BITSTREAM_READER
  283.     if (s->index < s->size_in_bits_plus8)
               ^
  284. #endif
  285.         index++;

libavcodec/get_bits.h:286:5: 
  284. #endif
  285.         index++;
  286.     s->index = index;
           ^
  287. 
  288.     return result;

libavcodec/get_bits.h:288:5: 
  286.     s->index = index;
  287. 
  288.     return result;
           ^
  289. }
  290. 

libavcodec/get_bits.h:289:1: return from a call to get_bits1
  287. 
  288.     return result;
  289. }
       ^
  290. 
  291. static inline unsigned int show_bits1(GetBitContext *s)

libavcodec/smacker.c:306:9: Taking true branch
304.             return -1;
305.     }
306.     if(!get_bits1(&gb)) {
             ^
307.         av_log(smk->avctx, AV_LOG_INFO, "Skipping FULL tree\n");
308.         smk->full_tbl = av_malloc(sizeof(int) * 2);

libavcodec/smacker.c:307:9: Skipping av_log(): empty list of specs
305.     }
306.     if(!get_bits1(&gb)) {
307.         av_log(smk->avctx, AV_LOG_INFO, "Skipping FULL tree\n");
             ^
308.         smk->full_tbl = av_malloc(sizeof(int) * 2);
309.         smk->full_tbl[0] = 0;

libavcodec/smacker.c:308:9: 
306.     if(!get_bits1(&gb)) {
307.         av_log(smk->avctx, AV_LOG_INFO, "Skipping FULL tree\n");
308.         smk->full_tbl = av_malloc(sizeof(int) * 2);
             ^
309.         smk->full_tbl[0] = 0;
310.         smk->full_last[0] = smk->full_last[1] = smk->full_last[2] = 1;

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

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

libavutil/mem.c:69:9: Taking false branch
  67. 
  68.     /* let's disallow possibly ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
              ^
  70.         return NULL;
  71. 

libavutil/mem.c:69:35: Taking false branch
  67. 
  68.     /* let's disallow possibly ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
                                        ^
  70.         return NULL;
  71. 

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

libavutil/mem.c:81:9: 
  79. #elif HAVE_POSIX_MEMALIGN
  80.     if (posix_memalign(&ptr, 32, size))
  81.         ptr = NULL;
              ^
  82. #elif HAVE_ALIGNED_MALLOC
  83.     ptr = _aligned_malloc(size, 32);

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

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

libavcodec/smacker.c:309:9: 
307.         av_log(smk->avctx, AV_LOG_INFO, "Skipping FULL tree\n");
308.         smk->full_tbl = av_malloc(sizeof(int) * 2);
309.         smk->full_tbl[0] = 0;
             ^
310.         smk->full_last[0] = smk->full_last[1] = smk->full_last[2] = 1;
311.     } else {

static int decode_header_trees(SmackVContext *smk) {
    GetBitContext gb;
    int mmap_size, mclr_size, full_size, type_size;
    mmap_size = AV_RL32(smk->avctx->extradata);
    mclr_size = AV_RL32(smk->avctx->extradata + 4);
    full_size = AV_RL32(smk->avctx->extradata + 8);
    type_size = AV_RL32(smk->avctx->extradata + 12);
    init_get_bits(&gb, smk->avctx->extradata + 16, (smk->avctx->extradata_size - 16) * 8);
    if(!get_bits1(&gb)) {
        av_log(smk->avctx, AV_LOG_INFO, "Skipping MMAP tree\n");
        smk->mmap_tbl = av_malloc(sizeof(int) * 2);
        smk->mmap_tbl[0] = 0;
        smk->mmap_last[0] = smk->mmap_last[1] = smk->mmap_last[2] = 1;
    } else {
        if (smacker_decode_header_tree(smk, &gb, &smk->mmap_tbl, smk->mmap_last, mmap_size))
            return -1;
    }
    if(!get_bits1(&gb)) {
        av_log(smk->avctx, AV_LOG_INFO, "Skipping MCLR tree\n");
        smk->mclr_tbl = av_malloc(sizeof(int) * 2);
        smk->mclr_tbl[0] = 0;
        smk->mclr_last[0] = smk->mclr_last[1] = smk->mclr_last[2] = 1;
    } else {
        if (smacker_decode_header_tree(smk, &gb, &smk->mclr_tbl, smk->mclr_last, mclr_size))
            return -1;
    }
    if(!get_bits1(&gb)) {
        av_log(smk->avctx, AV_LOG_INFO, "Skipping FULL tree\n");
        smk->full_tbl = av_malloc(sizeof(int) * 2);
        smk->full_tbl[0] = 0;
        smk->full_last[0] = smk->full_last[1] = smk->full_last[2] = 1;
    } else {
        if (smacker_decode_header_tree(smk, &gb, &smk->full_tbl, smk->full_last, full_size))
            return -1;
    }
    if(!get_bits1(&gb)) {
        av_log(smk->avctx, AV_LOG_INFO, "Skipping TYPE tree\n");
        smk->type_tbl = av_malloc(sizeof(int) * 2);
        smk->type_tbl[0] = 0;
        smk->type_last[0] = smk->type_last[1] = smk->type_last[2] = 1;
    } else {
        if (smacker_decode_header_tree(smk, &gb, &smk->type_tbl, smk->type_last, type_size))
            return -1;
    }
    return 0;
}
['static int decode_header_trees(SmackVContext *smk) {\n    GetBitContext gb;\n    int mmap_size, mclr_size, full_size, type_size;\n    mmap_size = AV_RL32(smk->avctx->extradata);\n    mclr_size = AV_RL32(smk->avctx->extradata + 4);\n    full_size = AV_RL32(smk->avctx->extradata + 8);\n    type_size = AV_RL32(smk->avctx->extradata + 12);\n    init_get_bits(&gb, smk->avctx->extradata + 16, (smk->avctx->extradata_size - 16) * 8);\n    if(!get_bits1(&gb)) {\n        av_log(smk->avctx, AV_LOG_INFO, "Skipping MMAP tree\\n");\n        smk->mmap_tbl = av_malloc(sizeof(int) * 2);\n        smk->mmap_tbl[0] = 0;\n        smk->mmap_last[0] = smk->mmap_last[1] = smk->mmap_last[2] = 1;\n    } else {\n        if (smacker_decode_header_tree(smk, &gb, &smk->mmap_tbl, smk->mmap_last, mmap_size))\n            return -1;\n    }\n    if(!get_bits1(&gb)) {\n        av_log(smk->avctx, AV_LOG_INFO, "Skipping MCLR tree\\n");\n        smk->mclr_tbl = av_malloc(sizeof(int) * 2);\n        smk->mclr_tbl[0] = 0;\n        smk->mclr_last[0] = smk->mclr_last[1] = smk->mclr_last[2] = 1;\n    } else {\n        if (smacker_decode_header_tree(smk, &gb, &smk->mclr_tbl, smk->mclr_last, mclr_size))\n            return -1;\n    }\n    if(!get_bits1(&gb)) {\n        av_log(smk->avctx, AV_LOG_INFO, "Skipping FULL tree\\n");\n        smk->full_tbl = av_malloc(sizeof(int) * 2);\n        smk->full_tbl[0] = 0;\n        smk->full_last[0] = smk->full_last[1] = smk->full_last[2] = 1;\n    } else {\n        if (smacker_decode_header_tree(smk, &gb, &smk->full_tbl, smk->full_last, full_size))\n            return -1;\n    }\n    if(!get_bits1(&gb)) {\n        av_log(smk->avctx, AV_LOG_INFO, "Skipping TYPE tree\\n");\n        smk->type_tbl = av_malloc(sizeof(int) * 2);\n        smk->type_tbl[0] = 0;\n        smk->type_last[0] = smk->type_last[1] = smk->type_last[2] = 1;\n    } else {\n        if (smacker_decode_header_tree(smk, &gb, &smk->type_tbl, smk->type_last, type_size))\n            return -1;\n    }\n    return 0;\n}', 'static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,\n                                int bit_size)\n{\n    int buffer_size;\n    int ret = 0;\n    if (bit_size > INT_MAX - 7 || bit_size < 0 || !buffer) {\n        buffer_size = bit_size = 0;\n        buffer      = NULL;\n        ret         = AVERROR_INVALIDDATA;\n    }\n    buffer_size = (bit_size + 7) >> 3;\n    s->buffer             = buffer;\n    s->size_in_bits       = bit_size;\n#if !UNCHECKED_BITSTREAM_READER\n    s->size_in_bits_plus8 = bit_size + 8;\n#endif\n    s->buffer_end         = buffer + buffer_size;\n    s->index              = 0;\n    return ret;\n}', 'static inline unsigned int get_bits1(GetBitContext *s)\n{\n    unsigned int index = s->index;\n    uint8_t result     = s->buffer[index >> 3];\n#ifdef BITSTREAM_READER_LE\n    result >>= index & 7;\n    result  &= 1;\n#else\n    result <<= index & 7;\n    result >>= 8 - 1;\n#endif\n#if !UNCHECKED_BITSTREAM_READER\n    if (s->index < s->size_in_bits_plus8)\n#endif\n        index++;\n    s->index = index;\n    return result;\n}', 'void *av_malloc(size_t size)\n{\n    void *ptr = NULL;\n#if CONFIG_MEMALIGN_HACK\n    long diff;\n#endif\n    if (size > (INT_MAX - 32) || !size)\n        return NULL;\n#if CONFIG_MEMALIGN_HACK\n    ptr = malloc(size + 32);\n    if (!ptr)\n        return ptr;\n    diff              = ((-(long)ptr - 1) & 31) + 1;\n    ptr               = (char *)ptr + diff;\n    ((char *)ptr)[-1] = diff;\n#elif HAVE_POSIX_MEMALIGN\n    if (posix_memalign(&ptr, 32, size))\n        ptr = NULL;\n#elif HAVE_ALIGNED_MALLOC\n    ptr = _aligned_malloc(size, 32);\n#elif HAVE_MEMALIGN\n    ptr = memalign(32, size);\n#else\n    ptr = malloc(size);\n#endif\n    return ptr;\n}']