libavformat/rtsp.c:2085: error: Null Dereference
  pointer `content` last assigned on line 2079 could be null and is dereferenced at line 2085, column 5.

libavformat/rtsp.c:2061:1: start of procedure sdp_read_header()
2059. }
2060. 
2061. static int sdp_read_header(AVFormatContext *s)
      ^
2062. {
2063.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:2063:5: 
2061. static int sdp_read_header(AVFormatContext *s)
2062. {
2063.     RTSPState *rt = s->priv_data;
          ^
2064.     RTSPStream *rtsp_st;
2065.     int size, i, err;

libavformat/rtsp.c:2069:10: 
2067.     char url[1024];
2068. 
2069.     if (!ff_network_init())
               ^
2070.         return AVERROR(EIO);
2071. 

libavformat/network.c:122:1: start of procedure ff_network_init()
  120. int ff_network_inited_globally;
  121. 
  122. int ff_network_init(void)
       ^
  123. {
  124. #if HAVE_WINSOCK2_H

libavformat/network.c:128:10: Taking true branch
  126. #endif
  127. 
  128.     if (!ff_network_inited_globally)
                ^
  129.         av_log(NULL, AV_LOG_WARNING, "Using network protocols without global "
  130.                                      "network initialization. Please use "

libavformat/network.c:129:9: Skipping av_log(): empty list of specs
  127. 
  128.     if (!ff_network_inited_globally)
  129.         av_log(NULL, AV_LOG_WARNING, "Using network protocols without global "
               ^
  130.                                      "network initialization. Please use "
  131.                                      "avformat_network_init(), this will "

libavformat/network.c:137:5: 
  135.         return 0;
  136. #endif
  137.     return 1;
           ^
  138. }
  139. 

libavformat/network.c:138:1: return from a call to ff_network_init
  136. #endif
  137.     return 1;
  138. }
       ^
  139. 
  140. int ff_network_wait_fd(int fd, int write)

libavformat/rtsp.c:2069:10: Taking false branch
2067.     char url[1024];
2068. 
2069.     if (!ff_network_init())
               ^
2070.         return AVERROR(EIO);
2071. 

libavformat/rtsp.c:2072:9: Taking false branch
2070.         return AVERROR(EIO);
2071. 
2072.     if (s->max_delay < 0) /* Not set by the caller */
              ^
2073.         s->max_delay = DEFAULT_REORDERING_DELAY;
2074.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)

libavformat/rtsp.c:2074:9: Taking true branch
2072.     if (s->max_delay < 0) /* Not set by the caller */
2073.         s->max_delay = DEFAULT_REORDERING_DELAY;
2074.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)
              ^
2075.         rt->lower_transport = RTSP_LOWER_TRANSPORT_CUSTOM;
2076. 

libavformat/rtsp.c:2075:9: 
2073.         s->max_delay = DEFAULT_REORDERING_DELAY;
2074.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)
2075.         rt->lower_transport = RTSP_LOWER_TRANSPORT_CUSTOM;
              ^
2076. 
2077.     /* read the whole sdp file */

libavformat/rtsp.c:2079:5: 
2077.     /* read the whole sdp file */
2078.     /* XXX: better loading */
2079.     content = av_malloc(SDP_MAX_SIZE);
          ^
2080.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
2081.     if (size <= 0) {

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 false branch
  67. 
  68.     /* let's disallow possible ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
              ^
  70.         return NULL;
  71. 

libavutil/mem.c:69:35: Taking false branch
  67. 
  68.     /* let's disallow possible ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
                                        ^
  70.         return NULL;
  71. 

libavutil/mem.c:80:9: Taking true branch
  78.     ((char *)ptr)[-1] = diff;
  79. #elif HAVE_POSIX_MEMALIGN
  80.     if (posix_memalign(&ptr, 32, size))
              ^
  81.         ptr = NULL;
  82. #elif HAVE_ALIGNED_MALLOC

libavutil/mem.c:81:9: 
  79. #elif HAVE_POSIX_MEMALIGN
  80.     if (posix_memalign(&ptr, 32, size))
  81.         ptr = NULL;
              ^
  82. #elif HAVE_ALIGNED_MALLOC
  83.     ptr = _aligned_malloc(size, 32);

libavutil/mem.c:113:5: 
  111.     ptr = malloc(size);
  112. #endif
  113.     return ptr;
           ^
  114. }
  115. 

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)

libavformat/rtsp.c:2080:5: Skipping avio_read(): empty list of specs
2078.     /* XXX: better loading */
2079.     content = av_malloc(SDP_MAX_SIZE);
2080.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
          ^
2081.     if (size <= 0) {
2082.         av_free(content);

libavformat/rtsp.c:2081:9: Taking false branch
2079.     content = av_malloc(SDP_MAX_SIZE);
2080.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
2081.     if (size <= 0) {
              ^
2082.         av_free(content);
2083.         return AVERROR_INVALIDDATA;

libavformat/rtsp.c:2085:5: 
2083.         return AVERROR_INVALIDDATA;
2084.     }
2085.     content[size] ='\0';
          ^
2086. 
2087.     err = ff_sdp_parse(s, content);
