libavcodec/resample.c:189: error: Null Dereference
  pointer `bufin[i]` last assigned on line 188 could be null and is dereferenced by call to `memcpy()` at line 189, column 9.

libavcodec/resample.c:172:1: start of procedure audio_resample()
170. /* resample audio. 'nb_samples' is the number of input samples */
171. /* XXX: optimize it ! */
172. int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples)
     ^
173. {
174.     int i, nb_samples1;

libavcodec/resample.c:180:9: Taking false branch
178.     int lenout;
179. 
180.     if (s->input_channels == s->output_channels && s->ratio == 1.0 && 0) {
             ^
181.         /* nothing to do */
182.         memcpy(output, input, nb_samples * s->input_channels * sizeof(short));

libavcodec/resample.c:187:9: 
185. 
186.     /* XXX: move those malloc to resample init code */
187.     for(i=0; i<s->filter_channels; i++){
             ^
188.         bufin[i]= av_malloc( (nb_samples + s->temp_len) * sizeof(short) );
189.         memcpy(bufin[i], s->temp[i], s->temp_len * sizeof(short));

libavcodec/resample.c:187:14: Loop condition is true. Entering loop body
185. 
186.     /* XXX: move those malloc to resample init code */
187.     for(i=0; i<s->filter_channels; i++){
                  ^
188.         bufin[i]= av_malloc( (nb_samples + s->temp_len) * sizeof(short) );
189.         memcpy(bufin[i], s->temp[i], s->temp_len * sizeof(short));

libavcodec/resample.c:188:9: 
186.     /* XXX: move those malloc to resample init code */
187.     for(i=0; i<s->filter_channels; i++){
188.         bufin[i]= av_malloc( (nb_samples + s->temp_len) * sizeof(short) );
             ^
189.         memcpy(bufin[i], s->temp[i], s->temp_len * sizeof(short));
190.         buftmp2[i] = bufin[i] + s->temp_len;

libavutil/mem.c:42:1: start of procedure av_malloc()
  40.    linker will do it automatically */
  41. 
  42. void *av_malloc(unsigned int size)
      ^
  43. {
  44.     void *ptr;

libavutil/mem.c:50:8: Taking true branch
  48. 
  49.     /* let's disallow possible ambiguous cases */
  50.     if(size > (INT_MAX-16) )
             ^
  51.         return NULL;
  52. 

libavutil/mem.c:51:9: 
  49.     /* let's disallow possible ambiguous cases */
  50.     if(size > (INT_MAX-16) )
  51.         return NULL;
              ^
  52. 
  53. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:92:1: return from a call to av_malloc
  90. #endif
  91.     return ptr;
  92. }
      ^
  93. 
  94. void *av_realloc(void *ptr, unsigned int size)

libavcodec/resample.c:189:9: 
187.     for(i=0; i<s->filter_channels; i++){
188.         bufin[i]= av_malloc( (nb_samples + s->temp_len) * sizeof(short) );
189.         memcpy(bufin[i], s->temp[i], s->temp_len * sizeof(short));
             ^
190.         buftmp2[i] = bufin[i] + s->temp_len;
191.     }
