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

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

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

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

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:2032:10: Taking false branch
2030.     char url[1024];
2031. 
2032.     if (!ff_network_init())
               ^
2033.         return AVERROR(EIO);
2034. 

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

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

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

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

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

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