libavformat/oggparsevorbis.c:182: error: Null Dereference
  pointer `ptr` last assigned on line 180 could be null and is dereferenced at line 182, column 5.

libavformat/oggparsevorbis.c:172:1: start of procedure fixup_vorbis_headers()
170. 
171. 
172. static unsigned int
     ^
173. fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv,
174.                      uint8_t **buf)

libavformat/oggparsevorbis.c:179:5: 
177.     unsigned char *ptr;
178. 
179.     len = priv->len[0] + priv->len[1] + priv->len[2];
         ^
180.     ptr = *buf = av_mallocz(len + len/255 + 64);
181. 

libavformat/oggparsevorbis.c:180:5: 
178. 
179.     len = priv->len[0] + priv->len[1] + priv->len[2];
180.     ptr = *buf = av_mallocz(len + len/255 + 64);
         ^
181. 
182.     ptr[0] = 2;

libavutil/mem.c:154:1: start of procedure av_mallocz()
  152. }
  153. 
  154. void *av_mallocz(size_t size)
       ^
  155. {
  156.     void *ptr = av_malloc(size);

libavutil/mem.c:156:5: 
  154. void *av_mallocz(size_t size)
  155. {
  156.     void *ptr = av_malloc(size);
           ^
  157.     if (ptr)
  158.         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(size_t size)
        ^
    65. {
    66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
    64. void *av_malloc(size_t 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-32) )
               ^
    73.         return NULL;
    74. 

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

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

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

libavutil/mem.c:159:5: 
  157.     if (ptr)
  158.         memset(ptr, 0, size);
  159.     return ptr;
           ^
  160. }
  161. 

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

libavformat/oggparsevorbis.c:182:5: 
180.     ptr = *buf = av_mallocz(len + len/255 + 64);
181. 
182.     ptr[0] = 2;
         ^
183.     offset = 1;
184.     offset += av_xiphlacing(&ptr[offset], priv->len[0]);
