libavcodec/noise_bsf.c:37: error: Null Dereference
  pointer `*poutbuf` last assigned on line 35 could be null and is dereferenced by call to `memcpy()` at line 37, column 5.

libavcodec/noise_bsf.c:28:1: start of procedure noise()
26. 
27. 
28. static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args,
    ^
29.                      uint8_t **poutbuf, int *poutbuf_size,
30.                      const uint8_t *buf, int buf_size, int keyframe){

libavcodec/noise_bsf.c:31:5: 
29.                      uint8_t **poutbuf, int *poutbuf_size,
30.                      const uint8_t *buf, int buf_size, int keyframe){
31.     unsigned int *state= bsfc->priv_data;
        ^
32.     int amount= args ? atoi(args) : (*state % 10001+1);
33.     int i;

libavcodec/noise_bsf.c:32:17: Condition is false
30.                      const uint8_t *buf, int buf_size, int keyframe){
31.     unsigned int *state= bsfc->priv_data;
32.     int amount= args ? atoi(args) : (*state % 10001+1);
                    ^
33.     int i;
34. 

libavcodec/noise_bsf.c:32:5: 
30.                      const uint8_t *buf, int buf_size, int keyframe){
31.     unsigned int *state= bsfc->priv_data;
32.     int amount= args ? atoi(args) : (*state % 10001+1);
        ^
33.     int i;
34. 

libavcodec/noise_bsf.c:35:5: 
33.     int i;
34. 
35.     *poutbuf= av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
        ^
36. 
37.     memcpy(*poutbuf, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);

libavutil/mem.c:64:1: start of procedure av_malloc()
  62.    linker will do it automatically. */
  63. 
  64. void *av_malloc(size_t size)
      ^
  65. {
  66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
  64. void *av_malloc(size_t size)
  65. {
  66.     void *ptr = NULL;
          ^
  67. #if CONFIG_MEMALIGN_HACK
  68.     long diff;

libavutil/mem.c:72:9: Taking true branch
  70. 
  71.     /* let's disallow possible ambiguous cases */
  72.     if (size > (INT_MAX-32) || !size)
              ^
  73.         return NULL;
  74. 

libavutil/mem.c:73:9: 
  71.     /* let's disallow possible ambiguous cases */
  72.     if (size > (INT_MAX-32) || !size)
  73.         return NULL;
              ^
  74. 
  75. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:117:1: return from a call to av_malloc
  115. #endif
  116.     return ptr;
  117. }
       ^
  118. 
  119. void *av_realloc(void *ptr, size_t size)

libavcodec/noise_bsf.c:37:5: 
35.     *poutbuf= av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
36. 
37.     memcpy(*poutbuf, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
        ^
38.     for(i=0; i<buf_size; i++){
39.         (*state) += (*poutbuf)[i] + 1;
