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

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

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

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

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

libavcodec/noise_bsf.c:31:5: 
29.     int i;
30. 
31.     *poutbuf= av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
        ^
32. 
33.     memcpy(*poutbuf, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);

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

libavutil/mem.c:45:5: 
  43. void *av_malloc(unsigned int size)
  44. {
  45.     void *ptr = NULL;
          ^
  46. #ifdef CONFIG_MEMALIGN_HACK
  47.     long diff;

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

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

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

libavcodec/noise_bsf.c:33:5: 
31.     *poutbuf= av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
32. 
33.     memcpy(*poutbuf, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
        ^
34.     for(i=0; i<buf_size; i++){
35.         (*state) += (*poutbuf)[i] + 1;
