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

libavcodec/flacdec.c:600:1: start of procedure flac_decode_frame()
598. }
599. 
600. static int flac_decode_frame(AVCodecContext *avctx,
     ^
601.                             void *data, int *data_size,
602.                             const uint8_t *buf, int buf_size)

libavcodec/flacdec.c:604:5: 
602.                             const uint8_t *buf, int buf_size)
603. {
604.     FLACContext *s = avctx->priv_data;
         ^
605.     int tmp = 0, i, j = 0, input_buf_size = 0;
606.     int16_t *samples_16 = data;

libavcodec/flacdec.c:605:5: 
603. {
604.     FLACContext *s = avctx->priv_data;
605.     int tmp = 0, i, j = 0, input_buf_size = 0;
         ^
606.     int16_t *samples_16 = data;
607.     int32_t *samples_32 = data;

libavcodec/flacdec.c:606:5: 
604.     FLACContext *s = avctx->priv_data;
605.     int tmp = 0, i, j = 0, input_buf_size = 0;
606.     int16_t *samples_16 = data;
         ^
607.     int32_t *samples_32 = data;
608.     int alloc_data_size= *data_size;

libavcodec/flacdec.c:607:5: 
605.     int tmp = 0, i, j = 0, input_buf_size = 0;
606.     int16_t *samples_16 = data;
607.     int32_t *samples_32 = data;
         ^
608.     int alloc_data_size= *data_size;
609. 

libavcodec/flacdec.c:608:5: 
606.     int16_t *samples_16 = data;
607.     int32_t *samples_32 = data;
608.     int alloc_data_size= *data_size;
         ^
609. 
610.     *data_size=0;

libavcodec/flacdec.c:610:5: 
608.     int alloc_data_size= *data_size;
609. 
610.     *data_size=0;
         ^
611. 
612.     if (s->max_framesize == 0) {

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

libavcodec/flacdec.c:613:27: Condition is false
611. 
612.     if (s->max_framesize == 0) {
613.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
                               ^
614.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
615.     }

libavcodec/flacdec.c:613:9: 
611. 
612.     if (s->max_framesize == 0) {
613.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
             ^
614.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
615.     }

libavcodec/flacdec.c:614:9: 
612.     if (s->max_framesize == 0) {
613.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
614.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
             ^
615.     }
616. 

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:617:9: Taking true branch
615.     }
616. 
617.     if (1 && s->max_framesize) { //FIXME truncated
             ^
618.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
619.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));

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

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

libavcodec/flacdec.c:618:38: 
616. 
617.     if (1 && s->max_framesize) { //FIXME truncated
618.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
                                          ^
619.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));
620.         input_buf_size= buf_size;
