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

libavformat/rtsp.c:2137:1: start of procedure sdp_read_header()
2135. }
2136. 
2137. static int sdp_read_header(AVFormatContext *s)
      ^
2138. {
2139.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:2139:5: 
2137. static int sdp_read_header(AVFormatContext *s)
2138. {
2139.     RTSPState *rt = s->priv_data;
          ^
2140.     RTSPStream *rtsp_st;
2141.     int size, i, err;

libavformat/rtsp.c:2145:10: 
2143.     char url[1024];
2144. 
2145.     if (!ff_network_init())
               ^
2146.         return AVERROR(EIO);
2147. 

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:2145:10: Taking false branch
2143.     char url[1024];
2144. 
2145.     if (!ff_network_init())
               ^
2146.         return AVERROR(EIO);
2147. 

libavformat/rtsp.c:2148:9: Taking false branch
2146.         return AVERROR(EIO);
2147. 
2148.     if (s->max_delay < 0) /* Not set by the caller */
              ^
2149.         s->max_delay = DEFAULT_REORDERING_DELAY;
2150.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)

libavformat/rtsp.c:2150:9: Taking true branch
2148.     if (s->max_delay < 0) /* Not set by the caller */
2149.         s->max_delay = DEFAULT_REORDERING_DELAY;
2150.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)
              ^
2151.         rt->lower_transport = RTSP_LOWER_TRANSPORT_CUSTOM;
2152. 

libavformat/rtsp.c:2151:9: 
2149.         s->max_delay = DEFAULT_REORDERING_DELAY;
2150.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)
2151.         rt->lower_transport = RTSP_LOWER_TRANSPORT_CUSTOM;
              ^
2152. 
2153.     /* read the whole sdp file */

libavformat/rtsp.c:2155:5: 
2153.     /* read the whole sdp file */
2154.     /* XXX: better loading */
2155.     content = av_malloc(SDP_MAX_SIZE);
          ^
2156.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
2157.     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:2156:5: Skipping avio_read(): empty list of specs
2154.     /* XXX: better loading */
2155.     content = av_malloc(SDP_MAX_SIZE);
2156.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
          ^
2157.     if (size <= 0) {
2158.         av_free(content);

libavformat/rtsp.c:2157:9: Taking false branch
2155.     content = av_malloc(SDP_MAX_SIZE);
2156.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
2157.     if (size <= 0) {
              ^
2158.         av_free(content);
2159.         return AVERROR_INVALIDDATA;

libavformat/rtsp.c:2161:5: 
2159.         return AVERROR_INVALIDDATA;
2160.     }
2161.     content[size] ='\0';
          ^
2162. 
2163.     err = ff_sdp_parse(s, content);
