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:132:1: start of procedure av_mallocz()
  130. }
  131. 
  132. void *av_mallocz(unsigned int size)
       ^
  133. {
  134.     void *ptr = av_malloc(size);

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

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

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

libavutil/mem.c:61:5: Skipping memalign(): method has no implementation
    59.     ((char*)ptr)[-1]= diff;
    60. #elif defined (HAVE_MEMALIGN)
    61.     ptr = memalign(16,size);
            ^
    62.     /* Why 64?
    63.        Indeed, we should align it:

libavutil/mem.c:91:5: 
    89.     ptr = malloc(size);
    90. #endif
    91.     return ptr;
            ^
    92. }
    93. 

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

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

libavutil/mem.c:137:5: 
  135.     if (ptr)
  136.         memset(ptr, 0, size);
  137.     return ptr;
           ^
  138. }
  139. 

libavutil/mem.c:138:1: return from a call to av_mallocz
  136.         memset(ptr, 0, size);
  137.     return ptr;
  138. }
       ^
  139. 
  140. 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 */
