libavformat/http.c:416: error: Null Dereference
  pointer `s->icy_metadata_headers` last assigned on line 413 could be null and is dereferenced by call to `av_strlcatf()` at line 416, column 5.

libavformat/http.c:405:1: start of procedure parse_icy()
403. 
404. // Concat all Icy- header lines
405. static int parse_icy(HTTPContext *s, const char *tag, const char *p)
     ^
406. {
407.     int len = 4 + strlen(p) + strlen(tag);

libavformat/http.c:407:5: 
405. static int parse_icy(HTTPContext *s, const char *tag, const char *p)
406. {
407.     int len = 4 + strlen(p) + strlen(tag);
         ^
408.     int ret;
409. 

libavformat/http.c:410:9: Taking false branch
408.     int ret;
409. 
410.     if (s->icy_metadata_headers)
             ^
411.         len += strlen(s->icy_metadata_headers);
412. 

libavformat/http.c:413:9: 
411.         len += strlen(s->icy_metadata_headers);
412. 
413.     if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0)
             ^
414.         return ret;
415. 

libavutil/mem.c:140:1: start of procedure av_reallocp()
  138. }
  139. 
  140. int av_reallocp(void *ptr, size_t size)
       ^
  141. {
  142.     void **ptrptr = ptr;

libavutil/mem.c:142:5: 
  140. int av_reallocp(void *ptr, size_t size)
  141. {
  142.     void **ptrptr = ptr;
           ^
  143.     void *ret;
  144. 

libavutil/mem.c:145:10: Taking true branch
  143.     void *ret;
  144. 
  145.     if (!size) {
                ^
  146.         av_freep(ptr);
  147.         return 0;

libavutil/mem.c:146:9: 
  144. 
  145.     if (!size) {
  146.         av_freep(ptr);
               ^
  147.         return 0;
  148.     }

libavutil/mem.c:198:1: start of procedure av_freep()
    196. }
    197. 
    198. void av_freep(void *arg)
         ^
    199. {
    200.     void **ptr = (void **)arg;

libavutil/mem.c:200:5: 
    198. void av_freep(void *arg)
    199. {
    200.     void **ptr = (void **)arg;
             ^
    201.     av_free(*ptr);
    202.     *ptr = NULL;

libavutil/mem.c:201:5: 
    199. {
    200.     void **ptr = (void **)arg;
    201.     av_free(*ptr);
             ^
    202.     *ptr = NULL;
    203. }

libavutil/mem.c:186:1: start of procedure av_free()
      184. }
      185. 
      186. void av_free(void *ptr)
           ^
      187. {
      188. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:194:5: 
      192.     _aligned_free(ptr);
      193. #else
      194.     free(ptr);
               ^
      195. #endif
      196. }

libavutil/mem.c:196:1: return from a call to av_free
      194.     free(ptr);
      195. #endif
      196. }
           ^
      197. 
      198. void av_freep(void *arg)

libavutil/mem.c:202:5: 
    200.     void **ptr = (void **)arg;
    201.     av_free(*ptr);
    202.     *ptr = NULL;
             ^
    203. }
    204. 

libavutil/mem.c:203:1: return from a call to av_freep
    201.     av_free(*ptr);
    202.     *ptr = NULL;
    203. }
         ^
    204. 
    205. void *av_mallocz(size_t size)

libavutil/mem.c:147:9: 
  145.     if (!size) {
  146.         av_freep(ptr);
  147.         return 0;
               ^
  148.     }
  149.     ret = av_realloc(*ptrptr, size);

libavutil/mem.c:158:1: return from a call to av_reallocp
  156.     *ptrptr = ret;
  157.     return 0;
  158. }
       ^
  159. 
  160. void *av_realloc_array(void *ptr, size_t nmemb, size_t size)

libavformat/http.c:413:9: Taking false branch
411.         len += strlen(s->icy_metadata_headers);
412. 
413.     if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0)
             ^
414.         return ret;
415. 

libavformat/http.c:416:5: 
414.         return ret;
415. 
416.     av_strlcatf(s->icy_metadata_headers, len, "%s: %s\n", tag, p);
         ^
417. 
418.     return 0;

libavutil/avstring.c:99:1: start of procedure av_strlcatf()
   97. }
   98. 
   99. size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...)
       ^
  100. {
  101.     int len = strlen(dst);

libavutil/avstring.c:101:5: 
   99. size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...)
  100. {
  101.     int len = strlen(dst);
           ^
  102.     va_list vl;
  103. 

libavutil/avstring.c:104:5: 
  102.     va_list vl;
  103. 
  104.     va_start(vl, fmt);
           ^
  105.     len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);
  106.     va_end(vl);

libavutil/avstring.c:105:33: Condition is true
  103. 
  104.     va_start(vl, fmt);
  105.     len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);
                                       ^
  106.     va_end(vl);
  107. 

libavutil/avstring.c:105:5: 
  103. 
  104.     va_start(vl, fmt);
  105.     len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);
           ^
  106.     va_end(vl);
  107. 

libavutil/avstring.c:106:5: 
  104.     va_start(vl, fmt);
  105.     len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);
  106.     va_end(vl);
           ^
  107. 
  108.     return len;

libavutil/avstring.c:108:5: 
  106.     va_end(vl);
  107. 
  108.     return len;
           ^
  109. }
  110. 

libavutil/avstring.c:109:1: return from a call to av_strlcatf
  107. 
  108.     return len;
  109. }
       ^
  110. 
  111. char *av_d2str(double d)

static int parse_icy(HTTPContext *s, const char *tag, const char *p)
{
    int len = 4 + strlen(p) + strlen(tag);
    int ret;
    if (s->icy_metadata_headers)
        len += strlen(s->icy_metadata_headers);
    if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0)
        return ret;
    av_strlcatf(s->icy_metadata_headers, len, "%s: %s\n", tag, p);
    return 0;
}
['static int parse_icy(HTTPContext *s, const char *tag, const char *p)\n{\n    int len = 4 + strlen(p) + strlen(tag);\n    int ret;\n    if (s->icy_metadata_headers)\n        len += strlen(s->icy_metadata_headers);\n    if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0)\n        return ret;\n    av_strlcatf(s->icy_metadata_headers, len, "%s: %s\\n", tag, p);\n    return 0;\n}', 'int av_reallocp(void *ptr, size_t size)\n{\n    void **ptrptr = ptr;\n    void *ret;\n    if (!size) {\n        av_freep(ptr);\n        return 0;\n    }\n    ret = av_realloc(*ptrptr, size);\n    if (!ret) {\n        av_freep(ptr);\n        return AVERROR(ENOMEM);\n    }\n    *ptrptr = ret;\n    return 0;\n}', 'void av_freep(void *arg)\n{\n    void **ptr = (void **)arg;\n    av_free(*ptr);\n    *ptr = NULL;\n}', 'void av_free(void *ptr)\n{\n#if CONFIG_MEMALIGN_HACK\n    if (ptr)\n        free((char *)ptr - ((char *)ptr)[-1]);\n#elif HAVE_ALIGNED_MALLOC\n    _aligned_free(ptr);\n#else\n    free(ptr);\n#endif\n}', 'size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...)\n{\n    int len = strlen(dst);\n    va_list vl;\n    va_start(vl, fmt);\n    len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);\n    va_end(vl);\n    return len;\n}']