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

libavformat/oggdec.c:189:1: start of procedure ogg_new_buf()
187. }
188. 
189. static int ogg_new_buf(struct ogg *ogg, int idx)
     ^
190. {
191.     struct ogg_stream *os = ogg->streams + idx;

libavformat/oggdec.c:191:5: 
189. static int ogg_new_buf(struct ogg *ogg, int idx)
190. {
191.     struct ogg_stream *os = ogg->streams + idx;
         ^
192.     uint8_t *nb = av_malloc(os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
193.     int size = os->bufpos - os->pstart;

libavformat/oggdec.c:192:5: 
190. {
191.     struct ogg_stream *os = ogg->streams + idx;
192.     uint8_t *nb = av_malloc(os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
         ^
193.     int size = os->bufpos - os->pstart;
194. 

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

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

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

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

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

libavformat/oggdec.c:193:5: 
191.     struct ogg_stream *os = ogg->streams + idx;
192.     uint8_t *nb = av_malloc(os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
193.     int size = os->bufpos - os->pstart;
         ^
194. 
195.     if (os->buf) {

libavformat/oggdec.c:195:9: Taking true branch
193.     int size = os->bufpos - os->pstart;
194. 
195.     if (os->buf) {
             ^
196.         memcpy(nb, os->buf + os->pstart, size);
197.         av_free(os->buf);

libavformat/oggdec.c:196:9: 
194. 
195.     if (os->buf) {
196.         memcpy(nb, os->buf + os->pstart, size);
             ^
197.         av_free(os->buf);
198.     }
