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

libavformat/oggparsevorbis.c:131:1: start of procedure fixup_vorbis_headers()
129. 
130. 
131. static unsigned int
     ^
132. fixup_vorbis_headers(AVFormatContext * as, oggvorbis_private_t *priv,
133.                      uint8_t **buf)

libavformat/oggparsevorbis.c:138:5: 
136.     unsigned char *ptr;
137. 
138.     len = priv->len[0] + priv->len[1] + priv->len[2];
         ^
139.     ptr = *buf = av_mallocz(len + len/255 + 64);
140. 

libavformat/oggparsevorbis.c:139:5: 
137. 
138.     len = priv->len[0] + priv->len[1] + priv->len[2];
139.     ptr = *buf = av_mallocz(len + len/255 + 64);
         ^
140. 
141.     ptr[0] = 2;

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 true branch
    48. 
    49.     /* let's disallow possible ambiguous cases */
    50.     if(size > (INT_MAX-16) )
               ^
    51.         return NULL;
    52. 

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

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:141:5: 
139.     ptr = *buf = av_mallocz(len + len/255 + 64);
140. 
141.     ptr[0] = 2;
         ^
142.     offset = 1;
143.     offset += av_xiphlacing(&ptr[offset], priv->len[0]);
