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:184:1: start of procedure av_mallocz()
  182. }
  183. 
  184. void *av_mallocz(size_t size)
       ^
  185. {
  186.     void *ptr = av_malloc(size);

libavutil/mem.c:186:5: 
  184. void *av_mallocz(size_t size)
  185. {
  186.     void *ptr = av_malloc(size);
           ^
  187.     if (ptr)
  188.         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:187:9: Taking false branch
  185. {
  186.     void *ptr = av_malloc(size);
  187.     if (ptr)
               ^
  188.         memset(ptr, 0, size);
  189.     return ptr;

libavutil/mem.c:189:5: 
  187.     if (ptr)
  188.         memset(ptr, 0, size);
  189.     return ptr;
           ^
  190. }
  191. 

libavutil/mem.c:190:1: return from a call to av_mallocz
  188.         memset(ptr, 0, size);
  189.     return ptr;
  190. }
       ^
  191. 
  192. 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]);
