libavcodec/flacdec.c:658: error: Null Dereference
  pointer `s->bitstream` last assigned on line 654 could be null and is dereferenced at line 658, column 38.

libavcodec/flacdec.c:637:1: start of procedure flac_decode_frame()
635. }
636. 
637. static int flac_decode_frame(AVCodecContext *avctx,
     ^
638.                             void *data, int *data_size,
639.                             AVPacket *avpkt)

libavcodec/flacdec.c:641:5: 
639.                             AVPacket *avpkt)
640. {
641.     const uint8_t *buf = avpkt->data;
         ^
642.     int buf_size = avpkt->size;
643.     FLACContext *s = avctx->priv_data;

libavcodec/flacdec.c:642:5: 
640. {
641.     const uint8_t *buf = avpkt->data;
642.     int buf_size = avpkt->size;
         ^
643.     FLACContext *s = avctx->priv_data;
644.     int i, j = 0, input_buf_size = 0, bytes_read = 0;

libavcodec/flacdec.c:643:5: 
641.     const uint8_t *buf = avpkt->data;
642.     int buf_size = avpkt->size;
643.     FLACContext *s = avctx->priv_data;
         ^
644.     int i, j = 0, input_buf_size = 0, bytes_read = 0;
645.     int16_t *samples_16 = data;

libavcodec/flacdec.c:644:5: 
642.     int buf_size = avpkt->size;
643.     FLACContext *s = avctx->priv_data;
644.     int i, j = 0, input_buf_size = 0, bytes_read = 0;
         ^
645.     int16_t *samples_16 = data;
646.     int32_t *samples_32 = data;

libavcodec/flacdec.c:645:5: 
643.     FLACContext *s = avctx->priv_data;
644.     int i, j = 0, input_buf_size = 0, bytes_read = 0;
645.     int16_t *samples_16 = data;
         ^
646.     int32_t *samples_32 = data;
647.     int alloc_data_size= *data_size;

libavcodec/flacdec.c:646:5: 
644.     int i, j = 0, input_buf_size = 0, bytes_read = 0;
645.     int16_t *samples_16 = data;
646.     int32_t *samples_32 = data;
         ^
647.     int alloc_data_size= *data_size;
648.     int output_size;

libavcodec/flacdec.c:647:5: 
645.     int16_t *samples_16 = data;
646.     int32_t *samples_32 = data;
647.     int alloc_data_size= *data_size;
         ^
648.     int output_size;
649. 

libavcodec/flacdec.c:650:5: 
648.     int output_size;
649. 
650.     *data_size=0;
         ^
651. 
652.     if (s->max_framesize == 0) {

libavcodec/flacdec.c:652:9: Taking true branch
650.     *data_size=0;
651. 
652.     if (s->max_framesize == 0) {
             ^
653.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
654.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);

libavcodec/flacdec.c:653:27: Condition is false
651. 
652.     if (s->max_framesize == 0) {
653.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
                               ^
654.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
655.     }

libavcodec/flacdec.c:653:9: 
651. 
652.     if (s->max_framesize == 0) {
653.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
             ^
654.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
655.     }

libavcodec/flacdec.c:654:9: 
652.     if (s->max_framesize == 0) {
653.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
654.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
             ^
655.     }
656. 

libavcodec/utils.c:69:1: start of procedure av_fast_realloc()
  67. static int volatile entangled_thread_counter=0;
  68. 
  69. void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size)
      ^
  70. {
  71.     if(min_size < *size)

libavcodec/utils.c:71:8: Taking false branch
  69. void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size)
  70. {
  71.     if(min_size < *size)
             ^
  72.         return ptr;
  73. 

libavcodec/utils.c:74:12: Condition is false
  72.         return ptr;
  73. 
  74.     *size= FFMAX(17*min_size/16 + 32, min_size);
                 ^
  75. 
  76.     ptr= av_realloc(ptr, *size);

libavcodec/utils.c:74:5: 
  72.         return ptr;
  73. 
  74.     *size= FFMAX(17*min_size/16 + 32, min_size);
          ^
  75. 
  76.     ptr= av_realloc(ptr, *size);

libavcodec/utils.c:76:5: 
  74.     *size= FFMAX(17*min_size/16 + 32, min_size);
  75. 
  76.     ptr= av_realloc(ptr, *size);
          ^
  77.     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
  78.         *size= 0;

libavutil/mem.c:102:1: start of procedure av_realloc()
    100. }
    101. 
    102. void *av_realloc(void *ptr, unsigned int size)
         ^
    103. {
    104. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:109:8: Taking true branch
    107. 
    108.     /* let's disallow possible ambiguous cases */
    109.     if(size > (INT_MAX-16) )
                ^
    110.         return NULL;
    111. 

libavutil/mem.c:110:9: 
    108.     /* let's disallow possible ambiguous cases */
    109.     if(size > (INT_MAX-16) )
    110.         return NULL;
                 ^
    111. 
    112. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:120:1: return from a call to av_realloc
    118.     return realloc(ptr, size);
    119. #endif
    120. }
         ^
    121. 
    122. void av_free(void *ptr)

libavcodec/utils.c:77:9: Taking true branch
  75. 
  76.     ptr= av_realloc(ptr, *size);
  77.     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
              ^
  78.         *size= 0;
  79. 

libavcodec/utils.c:78:9: 
  76.     ptr= av_realloc(ptr, *size);
  77.     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
  78.         *size= 0;
              ^
  79. 
  80.     return ptr;

libavcodec/utils.c:80:5: 
  78.         *size= 0;
  79. 
  80.     return ptr;
          ^
  81. }
  82. 

libavcodec/utils.c:81:1: return from a call to av_fast_realloc
  79. 
  80.     return ptr;
  81. }
      ^
  82. 
  83. void av_fast_malloc(void *ptr, unsigned int *size, unsigned int min_size)

libavcodec/flacdec.c:657:9: Taking true branch
655.     }
656. 
657.     if (1 && s->max_framesize) { //FIXME truncated
             ^
658.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
659.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));

libavcodec/flacdec.c:657:14: Taking true branch
655.     }
656. 
657.     if (1 && s->max_framesize) { //FIXME truncated
                  ^
658.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
659.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));

libavcodec/flacdec.c:658:13: Taking false branch
656. 
657.     if (1 && s->max_framesize) { //FIXME truncated
658.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
                 ^
659.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));
660.         input_buf_size= buf_size;

libavcodec/flacdec.c:658:38: 
656. 
657.     if (1 && s->max_framesize) { //FIXME truncated
658.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
                                          ^
659.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));
660.         input_buf_size= buf_size;
