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

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

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

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

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

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

libavformat/rtsp.c:1979:5: 
1977.     /* read the whole sdp file */
1978.     /* XXX: better loading */
1979.     content = av_malloc(SDP_MAX_SIZE);
          ^
1980.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
1981.     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:1980:5: Skipping avio_read(): empty list of specs
1978.     /* XXX: better loading */
1979.     content = av_malloc(SDP_MAX_SIZE);
1980.     size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
          ^
1981.     if (size <= 0) {
1982.         av_free(content);

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

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