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

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

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

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

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

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

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

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

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

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

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

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

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

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

libavcodec/utils.c:69:5: 
  67.     *size= FFMAX(17*min_size/16 + 32, min_size);
  68. 
  69.     ptr= av_realloc(ptr, *size);
          ^
  70.     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
  71.         *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:70:9: Taking true branch
  68. 
  69.     ptr= av_realloc(ptr, *size);
  70.     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
              ^
  71.         *size= 0;
  72. 

libavcodec/utils.c:71:9: 
  69.     ptr= av_realloc(ptr, *size);
  70.     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
  71.         *size= 0;
              ^
  72. 
  73.     return ptr;

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

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

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

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

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

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