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

libavformat/rtsp.c:1962:1: start of procedure sdp_read_header()
1960. }
1961. 
1962. static int sdp_read_header(AVFormatContext *s)
      ^
1963. {
1964.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:1964:5: 
1962. static int sdp_read_header(AVFormatContext *s)
1963. {
1964.     RTSPState *rt = s->priv_data;
          ^
1965.     RTSPStream *rtsp_st;
1966.     int size, i, err;

libavformat/rtsp.c:1970:10: 
1968.     char url[1024];
1969. 
1970.     if (!ff_network_init())
               ^
1971.         return AVERROR(EIO);
1972. 

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:1970:10: Taking false branch
1968.     char url[1024];
1969. 
1970.     if (!ff_network_init())
               ^
1971.         return AVERROR(EIO);
1972. 

libavformat/rtsp.c:1973:9: Taking false branch
1971.         return AVERROR(EIO);
1972. 
1973.     if (s->max_delay < 0) /* Not set by the caller */
              ^
1974.         s->max_delay = DEFAULT_REORDERING_DELAY;
1975. 

libavformat/rtsp.c:1978:5: 
1976.     /* read the whole sdp file */
1977.     /* XXX: better loading */
1978.     content = av_malloc(SDP_MAX_SIZE);
          ^
1979.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
1980.     if (size <= 0) {

libavutil/mem.c:66:1: start of procedure av_malloc()
  64.  * linker will do it automatically. */
  65. 
  66. void *av_malloc(size_t size)
      ^
  67. {
  68.     void *ptr = NULL;

libavutil/mem.c:68:5: 
  66. void *av_malloc(size_t size)
  67. {
  68.     void *ptr = NULL;
          ^
  69. #if CONFIG_MEMALIGN_HACK
  70.     long diff;

libavutil/mem.c:74:9: Taking false branch
  72. 
  73.     /* let's disallow possible ambiguous cases */
  74.     if (size > (INT_MAX - 32) || !size)
              ^
  75.         return NULL;
  76. 

libavutil/mem.c:74:35: Taking false branch
  72. 
  73.     /* let's disallow possible ambiguous cases */
  74.     if (size > (INT_MAX - 32) || !size)
                                        ^
  75.         return NULL;
  76. 

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

libavutil/mem.c:86:9: 
  84. #elif HAVE_POSIX_MEMALIGN
  85.     if (posix_memalign(&ptr, 32, size))
  86.         ptr = NULL;
              ^
  87. #elif HAVE_ALIGNED_MALLOC
  88.     ptr = _aligned_malloc(size, 32);

libavutil/mem.c:118:5: 
  116.     ptr = malloc(size);
  117. #endif
  118.     return ptr;
           ^
  119. }
  120. 

libavutil/mem.c:119:1: return from a call to av_malloc
  117. #endif
  118.     return ptr;
  119. }
       ^
  120. 
  121. void *av_realloc(void *ptr, size_t size)

libavformat/rtsp.c:1979:5: Skipping avio_read(): empty list of specs
1977.     /* XXX: better loading */
1978.     content = av_malloc(SDP_MAX_SIZE);
1979.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
          ^
1980.     if (size <= 0) {
1981.         av_free(content);

libavformat/rtsp.c:1980:9: Taking false branch
1978.     content = av_malloc(SDP_MAX_SIZE);
1979.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
1980.     if (size <= 0) {
              ^
1981.         av_free(content);
1982.         return AVERROR_INVALIDDATA;

libavformat/rtsp.c:1984:5: 
1982.         return AVERROR_INVALIDDATA;
1983.     }
1984.     content[size] ='\0';
          ^
1985. 
1986.     err = ff_sdp_parse(s, content);
