libavformat/oggparsevorbis.c:189: error: Null Dereference
  pointer `priv->packet[os->seq]` last assigned on line 188 could be null and is dereferenced by call to `memcpy()` at line 189, column 5.

libavformat/oggparsevorbis.c:166:1: start of procedure vorbis_header()
164. 
165. 
166. static int
     ^
167. vorbis_header (AVFormatContext * s, int idx)
168. {

libavformat/oggparsevorbis.c:169:5: 
167. vorbis_header (AVFormatContext * s, int idx)
168. {
169.     struct ogg *ogg = s->priv_data;
         ^
170.     struct ogg_stream *os = ogg->streams + idx;
171.     AVStream *st = s->streams[idx];

libavformat/oggparsevorbis.c:170:5: 
168. {
169.     struct ogg *ogg = s->priv_data;
170.     struct ogg_stream *os = ogg->streams + idx;
         ^
171.     AVStream *st = s->streams[idx];
172.     struct oggvorbis_private *priv;

libavformat/oggparsevorbis.c:171:5: 
169.     struct ogg *ogg = s->priv_data;
170.     struct ogg_stream *os = ogg->streams + idx;
171.     AVStream *st = s->streams[idx];
         ^
172.     struct oggvorbis_private *priv;
173. 

libavformat/oggparsevorbis.c:174:9: Taking false branch
172.     struct oggvorbis_private *priv;
173. 
174.     if (os->seq > 2)
             ^
175.         return 0;
176. 

libavformat/oggparsevorbis.c:177:9: Taking false branch
175.         return 0;
176. 
177.     if (os->seq == 0) {
             ^
178.         os->private = av_mallocz(sizeof(struct oggvorbis_private));
179.         if (!os->private)

libavformat/oggparsevorbis.c:183:9: Taking false branch
181.     }
182. 
183.     if (os->psize < 1)
             ^
184.         return -1;
185. 

libavformat/oggparsevorbis.c:186:5: 
184.         return -1;
185. 
186.     priv = os->private;
         ^
187.     priv->len[os->seq] = os->psize;
188.     priv->packet[os->seq] = av_mallocz(os->psize);

libavformat/oggparsevorbis.c:187:5: 
185. 
186.     priv = os->private;
187.     priv->len[os->seq] = os->psize;
         ^
188.     priv->packet[os->seq] = av_mallocz(os->psize);
189.     memcpy(priv->packet[os->seq], os->buf + os->pstart, os->psize);

libavformat/oggparsevorbis.c:188:5: 
186.     priv = os->private;
187.     priv->len[os->seq] = os->psize;
188.     priv->packet[os->seq] = av_mallocz(os->psize);
         ^
189.     memcpy(priv->packet[os->seq], os->buf + os->pstart, os->psize);
190.     if (os->buf[os->pstart] == 1) {

libavutil/mem.c:140:1: start of procedure av_mallocz()
  138. }
  139. 
  140. void *av_mallocz(unsigned int size)
       ^
  141. {
  142.     void *ptr = av_malloc(size);

libavutil/mem.c:142:5: 
  140. void *av_mallocz(unsigned int size)
  141. {
  142.     void *ptr = av_malloc(size);
           ^
  143.     if (ptr)
  144.         memset(ptr, 0, size);

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)

libavutil/mem.c:143:9: Taking false branch
  141. {
  142.     void *ptr = av_malloc(size);
  143.     if (ptr)
               ^
  144.         memset(ptr, 0, size);
  145.     return ptr;

libavutil/mem.c:145:5: 
  143.     if (ptr)
  144.         memset(ptr, 0, size);
  145.     return ptr;
           ^
  146. }
  147. 

libavutil/mem.c:146:1: return from a call to av_mallocz
  144.         memset(ptr, 0, size);
  145.     return ptr;
  146. }
       ^
  147. 
  148. char *av_strdup(const char *s)

libavformat/oggparsevorbis.c:189:5: 
187.     priv->len[os->seq] = os->psize;
188.     priv->packet[os->seq] = av_mallocz(os->psize);
189.     memcpy(priv->packet[os->seq], os->buf + os->pstart, os->psize);
         ^
190.     if (os->buf[os->pstart] == 1) {
191.         const uint8_t *p = os->buf + os->pstart + 7; /* skip "\001vorbis" tag */
