libavcodec/asv1.c:415: error: Null Dereference
  pointer `a->bitstream_buffer` last assigned on line 408 could be null and is dereferenced at line 415, column 13.

libavcodec/asv1.c:388:1: start of procedure decode_frame()
386. }
387. 
388. static int decode_frame(AVCodecContext *avctx,
     ^
389.                         void *data, int *data_size,
390.                         const uint8_t *buf, int buf_size)

libavcodec/asv1.c:392:5: 
390.                         const uint8_t *buf, int buf_size)
391. {
392.     ASV1Context * const a = avctx->priv_data;
         ^
393.     AVFrame *picture = data;
394.     AVFrame * const p= (AVFrame*)&a->picture;

libavcodec/asv1.c:393:5: 
391. {
392.     ASV1Context * const a = avctx->priv_data;
393.     AVFrame *picture = data;
         ^
394.     AVFrame * const p= (AVFrame*)&a->picture;
395.     int mb_x, mb_y;

libavcodec/asv1.c:394:5: 
392.     ASV1Context * const a = avctx->priv_data;
393.     AVFrame *picture = data;
394.     AVFrame * const p= (AVFrame*)&a->picture;
         ^
395.     int mb_x, mb_y;
396. 

libavcodec/asv1.c:397:8: Taking true branch
395.     int mb_x, mb_y;
396. 
397.     if(p->data[0])
            ^
398.         avctx->release_buffer(avctx, p);
399. 

libavcodec/asv1.c:398:9: Skipping __function_pointer__(): unresolved function pointer
396. 
397.     if(p->data[0])
398.         avctx->release_buffer(avctx, p);
             ^
399. 
400.     p->reference= 0;

libavcodec/asv1.c:400:5: 
398.         avctx->release_buffer(avctx, p);
399. 
400.     p->reference= 0;
         ^
401.     if(avctx->get_buffer(avctx, p) < 0){
402.         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");

libavcodec/asv1.c:401:8: Taking false branch
399. 
400.     p->reference= 0;
401.     if(avctx->get_buffer(avctx, p) < 0){
            ^
402.         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
403.         return -1;

libavcodec/asv1.c:405:5: 
403.         return -1;
404.     }
405.     p->pict_type= FF_I_TYPE;
         ^
406.     p->key_frame= 1;
407. 

libavcodec/asv1.c:406:5: 
404.     }
405.     p->pict_type= FF_I_TYPE;
406.     p->key_frame= 1;
         ^
407. 
408.     a->bitstream_buffer= av_fast_realloc(a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);

libavcodec/asv1.c:408:5: 
406.     p->key_frame= 1;
407. 
408.     a->bitstream_buffer= av_fast_realloc(a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
         ^
409. 
410.     if(avctx->codec_id == CODEC_ID_ASV1)

libavcodec/utils.c:63:1: start of procedure av_fast_realloc()
  61. static int volatile entangled_thread_counter=0;
  62. 
  63. void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size)
      ^
  64. {
  65.     if(min_size < *size)

libavcodec/utils.c:65:8: Taking false branch
  63. void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size)
  64. {
  65.     if(min_size < *size)
             ^
  66.         return ptr;
  67. 

libavcodec/utils.c:68:12: Condition is true
  66.         return ptr;
  67. 
  68.     *size= FFMAX(17*min_size/16 + 32, min_size);
                 ^
  69. 
  70.     ptr= av_realloc(ptr, *size);

libavcodec/utils.c:68:5: 
  66.         return ptr;
  67. 
  68.     *size= FFMAX(17*min_size/16 + 32, min_size);
          ^
  69. 
  70.     ptr= av_realloc(ptr, *size);

libavcodec/utils.c:70:5: 
  68.     *size= FFMAX(17*min_size/16 + 32, min_size);
  69. 
  70.     ptr= av_realloc(ptr, *size);
          ^
  71.     if(!ptr) //we could set this to the unmodified min_size but this is safer if the user lost the ptr and uses NULL now
  72.         *size= 0;

libavutil/mem.c:94:1: start of procedure av_realloc()
    92. }
    93. 
    94. void *av_realloc(void *ptr, unsigned int size)
        ^
    95. {
    96. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:101:8: Taking true branch
     99. 
    100.     /* let's disallow possible ambiguous cases */
    101.     if(size > (INT_MAX-16) )
                ^
    102.         return NULL;
    103. 

libavutil/mem.c:102:9: 
    100.     /* let's disallow possible ambiguous cases */
    101.     if(size > (INT_MAX-16) )
    102.         return NULL;
                 ^
    103. 
    104. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:112:1: return from a call to av_realloc
    110.     return realloc(ptr, size);
    111. #endif
    112. }
         ^
    113. 
    114. void av_free(void *ptr)

libavcodec/utils.c:71:9: Taking true branch
  69. 
  70.     ptr= av_realloc(ptr, *size);
  71.     if(!ptr) //we could set this to the unmodified min_size but this is safer if the user lost the ptr and uses NULL now
              ^
  72.         *size= 0;
  73. 

libavcodec/utils.c:72:9: 
  70.     ptr= av_realloc(ptr, *size);
  71.     if(!ptr) //we could set this to the unmodified min_size but this is safer if the user lost the ptr and uses NULL now
  72.         *size= 0;
              ^
  73. 
  74.     return ptr;

libavcodec/utils.c:74:5: 
  72.         *size= 0;
  73. 
  74.     return ptr;
          ^
  75. }
  76. 

libavcodec/utils.c:75:1: return from a call to av_fast_realloc
  73. 
  74.     return ptr;
  75. }
      ^
  76. 
  77. /* encoder management */

libavcodec/asv1.c:410:8: Taking false branch
408.     a->bitstream_buffer= av_fast_realloc(a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
409. 
410.     if(avctx->codec_id == CODEC_ID_ASV1)
            ^
411.         a->dsp.bswap_buf((uint32_t*)a->bitstream_buffer, (const uint32_t*)buf, buf_size/4);
412.     else{

libavcodec/asv1.c:414:13: 
412.     else{
413.         int i;
414.         for(i=0; i<buf_size; i++)
                 ^
415.             a->bitstream_buffer[i]= ff_reverse[ buf[i] ];
416.     }

libavcodec/asv1.c:414:18: Loop condition is true. Entering loop body
412.     else{
413.         int i;
414.         for(i=0; i<buf_size; i++)
                      ^
415.             a->bitstream_buffer[i]= ff_reverse[ buf[i] ];
416.     }

libavcodec/asv1.c:415:13: 
413.         int i;
414.         for(i=0; i<buf_size; i++)
415.             a->bitstream_buffer[i]= ff_reverse[ buf[i] ];
                 ^
416.     }
417. 
