libavformat/oggdec.c:191: error: Null Dereference
  pointer `nb` last assigned on line 188 could be null and is dereferenced by call to `memcpy()` at line 191, column 9.

libavformat/oggdec.c:184:1: start of procedure ogg_new_buf()
182. }
183. 
184. static int
     ^
185. ogg_new_buf(struct ogg *ogg, int idx)
186. {

libavformat/oggdec.c:187:5: 
185. ogg_new_buf(struct ogg *ogg, int idx)
186. {
187.     struct ogg_stream *os = ogg->streams + idx;
         ^
188.     uint8_t *nb = av_malloc(os->bufsize);
189.     int size = os->bufpos - os->pstart;

libavformat/oggdec.c:188:5: 
186. {
187.     struct ogg_stream *os = ogg->streams + idx;
188.     uint8_t *nb = av_malloc(os->bufsize);
         ^
189.     int size = os->bufpos - os->pstart;
190.     if(os->buf){

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking true branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:56:9: 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
  56.         return NULL;
              ^
  57. 
  58. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

libavformat/oggdec.c:189:5: 
187.     struct ogg_stream *os = ogg->streams + idx;
188.     uint8_t *nb = av_malloc(os->bufsize);
189.     int size = os->bufpos - os->pstart;
         ^
190.     if(os->buf){
191.         memcpy(nb, os->buf + os->pstart, size);

libavformat/oggdec.c:190:8: Taking true branch
188.     uint8_t *nb = av_malloc(os->bufsize);
189.     int size = os->bufpos - os->pstart;
190.     if(os->buf){
            ^
191.         memcpy(nb, os->buf + os->pstart, size);
192.         av_free(os->buf);

libavformat/oggdec.c:191:9: 
189.     int size = os->bufpos - os->pstart;
190.     if(os->buf){
191.         memcpy(nb, os->buf + os->pstart, size);
             ^
192.         av_free(os->buf);
193.     }
