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:160:1: start of procedure av_mallocz()
  158. }
  159. 
  160. void *av_mallocz(size_t size)
       ^
  161. {
  162.     void *ptr = av_malloc(size);

libavutil/mem.c:162:5: 
  160. void *av_mallocz(size_t size)
  161. {
  162.     void *ptr = av_malloc(size);
           ^
  163.     if (ptr)
  164.         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:9: Taking true branch
    70. 
    71.     /* let's disallow possible ambiguous cases */
    72.     if (size > (INT_MAX-32) || !size)
                ^
    73.         return NULL;
    74. 

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

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

libavutil/mem.c:163:9: Taking false branch
  161. {
  162.     void *ptr = av_malloc(size);
  163.     if (ptr)
               ^
  164.         memset(ptr, 0, size);
  165.     return ptr;

libavutil/mem.c:165:5: 
  163.     if (ptr)
  164.         memset(ptr, 0, size);
  165.     return ptr;
           ^
  166. }
  167. 

libavutil/mem.c:166:1: return from a call to av_mallocz
  164.         memset(ptr, 0, size);
  165.     return ptr;
  166. }
       ^
  167. 
  168. 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]);
