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

libavformat/oggparsevorbis.c:151:1: start of procedure vorbis_header()
149. 
150. 
151. static int
     ^
152. vorbis_header (AVFormatContext * s, int idx)
153. {

libavformat/oggparsevorbis.c:154:5: 
152. vorbis_header (AVFormatContext * s, int idx)
153. {
154.     struct ogg *ogg = s->priv_data;
         ^
155.     struct ogg_stream *os = ogg->streams + idx;
156.     AVStream *st = s->streams[idx];

libavformat/oggparsevorbis.c:155:5: 
153. {
154.     struct ogg *ogg = s->priv_data;
155.     struct ogg_stream *os = ogg->streams + idx;
         ^
156.     AVStream *st = s->streams[idx];
157.     struct oggvorbis_private *priv;

libavformat/oggparsevorbis.c:156:5: 
154.     struct ogg *ogg = s->priv_data;
155.     struct ogg_stream *os = ogg->streams + idx;
156.     AVStream *st = s->streams[idx];
         ^
157.     struct oggvorbis_private *priv;
158. 

libavformat/oggparsevorbis.c:159:9: Taking false branch
157.     struct oggvorbis_private *priv;
158. 
159.     if (os->seq > 2)
             ^
160.         return 0;
161. 

libavformat/oggparsevorbis.c:162:9: Taking false branch
160.         return 0;
161. 
162.     if (os->seq == 0) {
             ^
163.         os->private = av_mallocz(sizeof(struct oggvorbis_private));
164.         if (!os->private)

libavformat/oggparsevorbis.c:168:9: Taking false branch
166.     }
167. 
168.     if (os->psize < 1)
             ^
169.         return -1;
170. 

libavformat/oggparsevorbis.c:171:5: 
169.         return -1;
170. 
171.     priv = os->private;
         ^
172.     priv->len[os->seq] = os->psize;
173.     priv->packet[os->seq] = av_mallocz(os->psize);

libavformat/oggparsevorbis.c:172:5: 
170. 
171.     priv = os->private;
172.     priv->len[os->seq] = os->psize;
         ^
173.     priv->packet[os->seq] = av_mallocz(os->psize);
174.     memcpy(priv->packet[os->seq], os->buf + os->pstart, os->psize);

libavformat/oggparsevorbis.c:173:5: 
171.     priv = os->private;
172.     priv->len[os->seq] = os->psize;
173.     priv->packet[os->seq] = av_mallocz(os->psize);
         ^
174.     memcpy(priv->packet[os->seq], os->buf + os->pstart, os->psize);
175.     if (os->buf[os->pstart] == 1) {

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

libavutil/mem.c:141:5: 
  139. void *av_mallocz(unsigned int size)
  140. {
  141.     void *ptr = av_malloc(size);
           ^
  142.     if (ptr)
  143.         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:99:1: return from a call to av_malloc
     97. #endif
     98.     return ptr;
     99. }
         ^
    100. 
    101. void *av_realloc(void *ptr, unsigned int size)

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

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

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

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