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

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

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

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

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

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

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

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

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

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

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

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