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

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

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

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

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

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

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

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

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

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

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

libavutil/mem.c:135:1: start of procedure av_mallocz()
  133. }
  134. 
  135. void *av_mallocz(unsigned int size)
       ^
  136. {
  137.     void *ptr = av_malloc(size);

libavutil/mem.c:137:5: 
  135. void *av_mallocz(unsigned int size)
  136. {
  137.     void *ptr = av_malloc(size);
           ^
  138.     if (ptr)
  139.         memset(ptr, 0, size);

libavutil/mem.c:43:1: start of procedure av_malloc()
    41.    linker will do it automatically */
    42. 
    43. void *av_malloc(unsigned int size)
        ^
    44. {
    45.     void *ptr = NULL;

libavutil/mem.c:45:5: 
    43. void *av_malloc(unsigned int size)
    44. {
    45.     void *ptr = NULL;
            ^
    46. #ifdef CONFIG_MEMALIGN_HACK
    47.     long diff;

libavutil/mem.c:51:8: Taking true branch
    49. 
    50.     /* let's disallow possible ambiguous cases */
    51.     if(size > (INT_MAX-16) )
               ^
    52.         return NULL;
    53. 

libavutil/mem.c:52:9: 
    50.     /* let's disallow possible ambiguous cases */
    51.     if(size > (INT_MAX-16) )
    52.         return NULL;
                ^
    53. 
    54. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:95:1: return from a call to av_malloc
    93. #endif
    94.     return ptr;
    95. }
        ^
    96. 
    97. void *av_realloc(void *ptr, unsigned int size)

libavutil/mem.c:138:9: Taking false branch
  136. {
  137.     void *ptr = av_malloc(size);
  138.     if (ptr)
               ^
  139.         memset(ptr, 0, size);
  140.     return ptr;

libavutil/mem.c:140:5: 
  138.     if (ptr)
  139.         memset(ptr, 0, size);
  140.     return ptr;
           ^
  141. }
  142. 

libavutil/mem.c:141:1: return from a call to av_mallocz
  139.         memset(ptr, 0, size);
  140.     return ptr;
  141. }
       ^
  142. 
  143. char *av_strdup(const char *s)

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