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

libavformat/oggparsevorbis.c:175:1: start of procedure fixup_vorbis_headers()
173. };
174. 
175. static unsigned int fixup_vorbis_headers(AVFormatContext *as,
     ^
176.                                          struct oggvorbis_private *priv,
177.                                          uint8_t **buf)

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

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

libavutil/mem.c:204:1: start of procedure av_mallocz()
  202. }
  203. 
  204. void *av_mallocz(size_t size)
       ^
  205. {
  206.     void *ptr = av_malloc(size);

libavutil/mem.c:206:5: 
  204. void *av_mallocz(size_t size)
  205. {
  206.     void *ptr = av_malloc(size);
           ^
  207.     if (ptr)
  208.         memset(ptr, 0, size);

libavutil/mem.c:61:1: start of procedure av_malloc()
    59.  * linker will do it automatically. */
    60. 
    61. void *av_malloc(size_t size)
        ^
    62. {
    63.     void *ptr = NULL;

libavutil/mem.c:63:5: 
    61. void *av_malloc(size_t size)
    62. {
    63.     void *ptr = NULL;
            ^
    64. #if CONFIG_MEMALIGN_HACK
    65.     long diff;

libavutil/mem.c:69:9: Taking true branch
    67. 
    68.     /* let's disallow possibly ambiguous cases */
    69.     if (size > (INT_MAX - 32) || !size)
                ^
    70.         return NULL;
    71. 

libavutil/mem.c:70:9: 
    68.     /* let's disallow possibly ambiguous cases */
    69.     if (size > (INT_MAX - 32) || !size)
    70.         return NULL;
                ^
    71. 
    72. #if CONFIG_MEMALIGN_HACK

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

libavutil/mem.c:207:9: Taking false branch
  205. {
  206.     void *ptr = av_malloc(size);
  207.     if (ptr)
               ^
  208.         memset(ptr, 0, size);
  209.     return ptr;

libavutil/mem.c:209:5: 
  207.     if (ptr)
  208.         memset(ptr, 0, size);
  209.     return ptr;
           ^
  210. }
  211. 

libavutil/mem.c:210:1: return from a call to av_mallocz
  208.         memset(ptr, 0, size);
  209.     return ptr;
  210. }
       ^
  211. 
  212. char *av_strdup(const char *s)

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