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

libavformat/oggparsevorbis.c:167:1: start of procedure fixup_vorbis_headers()
165. 
166. 
167. static unsigned int
     ^
168. fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv,
169.                      uint8_t **buf)

libavformat/oggparsevorbis.c:174:5: 
172.     unsigned char *ptr;
173. 
174.     len = priv->len[0] + priv->len[1] + priv->len[2];
         ^
175.     ptr = *buf = av_mallocz(len + len/255 + 64);
176. 

libavformat/oggparsevorbis.c:175:5: 
173. 
174.     len = priv->len[0] + priv->len[1] + priv->len[2];
175.     ptr = *buf = av_mallocz(len + len/255 + 64);
         ^
176. 
177.     ptr[0] = 2;

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

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

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

libavutil/mem.c:73:9: 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-16) )
    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, FF_INTERNAL_MEM_TYPE size)

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

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

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

libavformat/oggparsevorbis.c:177:5: 
175.     ptr = *buf = av_mallocz(len + len/255 + 64);
176. 
177.     ptr[0] = 2;
         ^
178.     offset = 1;
179.     offset += av_xiphlacing(&ptr[offset], priv->len[0]);
