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

libavcodec/flac.c:605:1: start of procedure flac_decode_frame()
603. }
604. 
605. static int flac_decode_frame(AVCodecContext *avctx,
     ^
606.                             void *data, int *data_size,
607.                             const uint8_t *buf, int buf_size)

libavcodec/flac.c:609:5: 
607.                             const uint8_t *buf, int buf_size)
608. {
609.     FLACContext *s = avctx->priv_data;
         ^
610.     int tmp = 0, i, j = 0, input_buf_size = 0;
611.     int16_t *samples = data;

libavcodec/flac.c:610:5: 
608. {
609.     FLACContext *s = avctx->priv_data;
610.     int tmp = 0, i, j = 0, input_buf_size = 0;
         ^
611.     int16_t *samples = data;
612.     int alloc_data_size= *data_size;

libavcodec/flac.c:611:5: 
609.     FLACContext *s = avctx->priv_data;
610.     int tmp = 0, i, j = 0, input_buf_size = 0;
611.     int16_t *samples = data;
         ^
612.     int alloc_data_size= *data_size;
613. 

libavcodec/flac.c:612:5: 
610.     int tmp = 0, i, j = 0, input_buf_size = 0;
611.     int16_t *samples = data;
612.     int alloc_data_size= *data_size;
         ^
613. 
614.     *data_size=0;

libavcodec/flac.c:614:5: 
612.     int alloc_data_size= *data_size;
613. 
614.     *data_size=0;
         ^
615. 
616.     if(s->max_framesize == 0){

libavcodec/flac.c:616:8: Taking true branch
614.     *data_size=0;
615. 
616.     if(s->max_framesize == 0){
            ^
617.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
618.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);

libavcodec/flac.c:617:27: Condition is false
615. 
616.     if(s->max_framesize == 0){
617.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
                               ^
618.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
619.     }

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

libavcodec/flac.c:618:9: 
616.     if(s->max_framesize == 0){
617.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
618.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
             ^
619.     }
620. 

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

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

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

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

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

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

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

libavcodec/utils.c:79:1: return from a call to av_fast_realloc
  77. 
  78.     return ptr;
  79. }
      ^
  80. 
  81. /* encoder management */

libavcodec/flac.c:621:8: Taking true branch
619.     }
620. 
621.     if(1 && s->max_framesize){//FIXME truncated
            ^
622.             if(s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
623.                 buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));

libavcodec/flac.c:621:13: Taking true branch
619.     }
620. 
621.     if(1 && s->max_framesize){//FIXME truncated
                 ^
622.             if(s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
623.                 buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));

libavcodec/flac.c:622:16: Taking false branch
620. 
621.     if(1 && s->max_framesize){//FIXME truncated
622.             if(s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
                    ^
623.                 buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));
624.             input_buf_size= buf_size;

libavcodec/flac.c:622:41: 
620. 
621.     if(1 && s->max_framesize){//FIXME truncated
622.             if(s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
                                             ^
623.                 buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));
624.             input_buf_size= buf_size;
