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

libavformat/oggparsevorbis.c:162:1: start of procedure vorbis_header()
160. 
161. 
162. static int
     ^
163. vorbis_header (AVFormatContext * s, int idx)
164. {

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

libavformat/oggparsevorbis.c:166:5: 
164. {
165.     struct ogg *ogg = s->priv_data;
166.     struct ogg_stream *os = ogg->streams + idx;
         ^
167.     AVStream *st = s->streams[idx];
168.     struct oggvorbis_private *priv;

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

libavformat/oggparsevorbis.c:170:9: Taking false branch
168.     struct oggvorbis_private *priv;
169. 
170.     if (os->seq > 2)
             ^
171.         return 0;
172. 

libavformat/oggparsevorbis.c:173:9: Taking false branch
171.         return 0;
172. 
173.     if (os->seq == 0) {
             ^
174.         os->private = av_mallocz(sizeof(struct oggvorbis_private));
175.         if (!os->private)

libavformat/oggparsevorbis.c:179:9: Taking false branch
177.     }
178. 
179.     if (os->psize < 1)
             ^
180.         return -1;
181. 

libavformat/oggparsevorbis.c:182:5: 
180.         return -1;
181. 
182.     priv = os->private;
         ^
183.     priv->len[os->seq] = os->psize;
184.     priv->packet[os->seq] = av_mallocz(os->psize);

libavformat/oggparsevorbis.c:183:5: 
181. 
182.     priv = os->private;
183.     priv->len[os->seq] = os->psize;
         ^
184.     priv->packet[os->seq] = av_mallocz(os->psize);
185.     memcpy(priv->packet[os->seq], os->buf + os->pstart, os->psize);

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

libavutil/mem.c:157:1: start of procedure av_mallocz()
  155. }
  156. 
  157. void *av_mallocz(unsigned int size)
       ^
  158. {
  159.     void *ptr = av_malloc(size);

libavutil/mem.c:159:5: 
  157. void *av_mallocz(unsigned int size)
  158. {
  159.     void *ptr = av_malloc(size);
           ^
  160.     if (ptr)
  161.         memset(ptr, 0, size);

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

libavutil/mem.c:66:5: 
    64. void *av_malloc(unsigned int size)
    65. {
    66.     void *ptr = NULL;
            ^
    67. #if CONFIG_MEMALIGN_HACK
    68.     long diff;

libavutil/mem.c:72:8: Taking true branch
    70. 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-16) )
               ^
    73.         return NULL;
    74. 

libavutil/mem.c:73:9: 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-16) )
    73.         return NULL;
                ^
    74. 
    75. #if CONFIG_MEMALIGN_HACK

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

libavutil/mem.c:160:9: Taking false branch
  158. {
  159.     void *ptr = av_malloc(size);
  160.     if (ptr)
               ^
  161.         memset(ptr, 0, size);
  162.     return ptr;

libavutil/mem.c:162:5: 
  160.     if (ptr)
  161.         memset(ptr, 0, size);
  162.     return ptr;
           ^
  163. }
  164. 

libavutil/mem.c:163:1: return from a call to av_mallocz
  161.         memset(ptr, 0, size);
  162.     return ptr;
  163. }
       ^
  164. 
  165. char *av_strdup(const char *s)

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