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

libavformat/rtsp.c:2203:1: start of procedure sdp_read_header()
2201. }
2202. 
2203. static int sdp_read_header(AVFormatContext *s)
      ^
2204. {
2205.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:2205:5: 
2203. static int sdp_read_header(AVFormatContext *s)
2204. {
2205.     RTSPState *rt = s->priv_data;
          ^
2206.     RTSPStream *rtsp_st;
2207.     int size, i, err;

libavformat/rtsp.c:2211:10: 
2209.     char url[1024];
2210. 
2211.     if (!ff_network_init())
               ^
2212.         return AVERROR(EIO);
2213. 

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

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

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

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

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

libavformat/rtsp.c:2211:10: Taking false branch
2209.     char url[1024];
2210. 
2211.     if (!ff_network_init())
               ^
2212.         return AVERROR(EIO);
2213. 

libavformat/rtsp.c:2214:9: Taking false branch
2212.         return AVERROR(EIO);
2213. 
2214.     if (s->max_delay < 0) /* Not set by the caller */
              ^
2215.         s->max_delay = DEFAULT_REORDERING_DELAY;
2216.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)

libavformat/rtsp.c:2216:9: Taking true branch
2214.     if (s->max_delay < 0) /* Not set by the caller */
2215.         s->max_delay = DEFAULT_REORDERING_DELAY;
2216.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)
              ^
2217.         rt->lower_transport = RTSP_LOWER_TRANSPORT_CUSTOM;
2218. 

libavformat/rtsp.c:2217:9: 
2215.         s->max_delay = DEFAULT_REORDERING_DELAY;
2216.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)
2217.         rt->lower_transport = RTSP_LOWER_TRANSPORT_CUSTOM;
              ^
2218. 
2219.     /* read the whole sdp file */

libavformat/rtsp.c:2221:5: 
2219.     /* read the whole sdp file */
2220.     /* XXX: better loading */
2221.     content = av_malloc(SDP_MAX_SIZE);
          ^
2222.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
2223.     if (size <= 0) {

libavutil/mem.c:62:1: start of procedure av_malloc()
  60.  * linker will do it automatically. */
  61. 
  62. void *av_malloc(size_t size)
      ^
  63. {
  64.     void *ptr = NULL;

libavutil/mem.c:64:5: 
  62. void *av_malloc(size_t size)
  63. {
  64.     void *ptr = NULL;
          ^
  65. #if CONFIG_MEMALIGN_HACK
  66.     long diff;

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

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

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

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

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

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

libavformat/rtsp.c:2222:5: Skipping avio_read(): empty list of specs
2220.     /* XXX: better loading */
2221.     content = av_malloc(SDP_MAX_SIZE);
2222.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
          ^
2223.     if (size <= 0) {
2224.         av_free(content);

libavformat/rtsp.c:2223:9: Taking false branch
2221.     content = av_malloc(SDP_MAX_SIZE);
2222.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
2223.     if (size <= 0) {
              ^
2224.         av_free(content);
2225.         return AVERROR_INVALIDDATA;

libavformat/rtsp.c:2227:5: 
2225.         return AVERROR_INVALIDDATA;
2226.     }
2227.     content[size] ='\0';
          ^
2228. 
2229.     err = ff_sdp_parse(s, content);
