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

libavformat/rtsp.c:2022:1: start of procedure sdp_read_header()
2020. }
2021. 
2022. static int sdp_read_header(AVFormatContext *s)
      ^
2023. {
2024.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:2024:5: 
2022. static int sdp_read_header(AVFormatContext *s)
2023. {
2024.     RTSPState *rt = s->priv_data;
          ^
2025.     RTSPStream *rtsp_st;
2026.     int size, i, err;

libavformat/rtsp.c:2030:10: 
2028.     char url[1024];
2029. 
2030.     if (!ff_network_init())
               ^
2031.         return AVERROR(EIO);
2032. 

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

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

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

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

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

libavformat/rtsp.c:2030:10: Taking false branch
2028.     char url[1024];
2029. 
2030.     if (!ff_network_init())
               ^
2031.         return AVERROR(EIO);
2032. 

libavformat/rtsp.c:2033:9: Taking false branch
2031.         return AVERROR(EIO);
2032. 
2033.     if (s->max_delay < 0) /* Not set by the caller */
              ^
2034.         s->max_delay = DEFAULT_REORDERING_DELAY;
2035.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)

libavformat/rtsp.c:2035:9: Taking true branch
2033.     if (s->max_delay < 0) /* Not set by the caller */
2034.         s->max_delay = DEFAULT_REORDERING_DELAY;
2035.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)
              ^
2036.         rt->lower_transport = RTSP_LOWER_TRANSPORT_CUSTOM;
2037. 

libavformat/rtsp.c:2036:9: 
2034.         s->max_delay = DEFAULT_REORDERING_DELAY;
2035.     if (rt->rtsp_flags & RTSP_FLAG_CUSTOM_IO)
2036.         rt->lower_transport = RTSP_LOWER_TRANSPORT_CUSTOM;
              ^
2037. 
2038.     /* read the whole sdp file */

libavformat/rtsp.c:2040:5: 
2038.     /* read the whole sdp file */
2039.     /* XXX: better loading */
2040.     content = av_malloc(SDP_MAX_SIZE);
          ^
2041.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
2042.     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:2041:5: Skipping avio_read(): empty list of specs
2039.     /* XXX: better loading */
2040.     content = av_malloc(SDP_MAX_SIZE);
2041.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
          ^
2042.     if (size <= 0) {
2043.         av_free(content);

libavformat/rtsp.c:2042:9: Taking false branch
2040.     content = av_malloc(SDP_MAX_SIZE);
2041.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
2042.     if (size <= 0) {
              ^
2043.         av_free(content);
2044.         return AVERROR_INVALIDDATA;

libavformat/rtsp.c:2046:5: 
2044.         return AVERROR_INVALIDDATA;
2045.     }
2046.     content[size] ='\0';
          ^
2047. 
2048.     err = ff_sdp_parse(s, content);
