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

libavcodec/flacdec.c:589:1: start of procedure flac_decode_frame()
587. }
588. 
589. static int flac_decode_frame(AVCodecContext *avctx,
     ^
590.                             void *data, int *data_size,
591.                             const uint8_t *buf, int buf_size)

libavcodec/flacdec.c:593:5: 
591.                             const uint8_t *buf, int buf_size)
592. {
593.     FLACContext *s = avctx->priv_data;
         ^
594.     int tmp = 0, i, j = 0, input_buf_size = 0;
595.     int16_t *samples_16 = data;

libavcodec/flacdec.c:594:5: 
592. {
593.     FLACContext *s = avctx->priv_data;
594.     int tmp = 0, i, j = 0, input_buf_size = 0;
         ^
595.     int16_t *samples_16 = data;
596.     int32_t *samples_32 = data;

libavcodec/flacdec.c:595:5: 
593.     FLACContext *s = avctx->priv_data;
594.     int tmp = 0, i, j = 0, input_buf_size = 0;
595.     int16_t *samples_16 = data;
         ^
596.     int32_t *samples_32 = data;
597.     int alloc_data_size= *data_size;

libavcodec/flacdec.c:596:5: 
594.     int tmp = 0, i, j = 0, input_buf_size = 0;
595.     int16_t *samples_16 = data;
596.     int32_t *samples_32 = data;
         ^
597.     int alloc_data_size= *data_size;
598. 

libavcodec/flacdec.c:597:5: 
595.     int16_t *samples_16 = data;
596.     int32_t *samples_32 = data;
597.     int alloc_data_size= *data_size;
         ^
598. 
599.     *data_size=0;

libavcodec/flacdec.c:599:5: 
597.     int alloc_data_size= *data_size;
598. 
599.     *data_size=0;
         ^
600. 
601.     if (s->max_framesize == 0) {

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

libavcodec/flacdec.c:602:27: Condition is false
600. 
601.     if (s->max_framesize == 0) {
602.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
                               ^
603.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
604.     }

libavcodec/flacdec.c:602:9: 
600. 
601.     if (s->max_framesize == 0) {
602.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
             ^
603.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
604.     }

libavcodec/flacdec.c:603:9: 
601.     if (s->max_framesize == 0) {
602.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
603.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
             ^
604.     }
605. 

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. /* encoder management */

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

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

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

libavcodec/flacdec.c:607:38: 
605. 
606.     if (1 && s->max_framesize) { //FIXME truncated
607.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
                                          ^
608.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));
609.         input_buf_size= buf_size;
