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

libavformat/rtsp.c:1829:1: start of procedure sdp_read_header()
1827. #define SDP_MAX_SIZE 8192
1828. 
1829. static int sdp_read_header(AVFormatContext *s, AVFormatParameters *ap)
      ^
1830. {
1831.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:1831:5: 
1829. static int sdp_read_header(AVFormatContext *s, AVFormatParameters *ap)
1830. {
1831.     RTSPState *rt = s->priv_data;
          ^
1832.     RTSPStream *rtsp_st;
1833.     int size, i, err;

libavformat/rtsp.c:1839:5: 
1837.     /* read the whole sdp file */
1838.     /* XXX: better loading */
1839.     content = av_malloc(SDP_MAX_SIZE);
          ^
1840.     size = get_buffer(s->pb, content, SDP_MAX_SIZE - 1);
1841.     if (size <= 0) {

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

libavutil/mem.c:66:5: 
  64. void *av_malloc(unsigned int size)
  65. {
  66.     void *ptr = NULL;
          ^
  67. #if CONFIG_MEMALIGN_HACK
  68.     long diff;

libavutil/mem.c:72:8: Taking false branch
  70. 
  71.     /* let's disallow possible ambiguous cases */
  72.     if(size > (INT_MAX-16) )
             ^
  73.         return NULL;
  74. 

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

libavutil/mem.c:84:9: 
  82. #elif HAVE_POSIX_MEMALIGN
  83.     if (posix_memalign(&ptr,16,size))
  84.         ptr = NULL;
              ^
  85. #elif HAVE_MEMALIGN
  86.     ptr = memalign(16,size);

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

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

libavformat/rtsp.c:1840:5: Skipping get_buffer(): empty list of specs
1838.     /* XXX: better loading */
1839.     content = av_malloc(SDP_MAX_SIZE);
1840.     size = get_buffer(s->pb, content, SDP_MAX_SIZE - 1);
          ^
1841.     if (size <= 0) {
1842.         av_free(content);

libavformat/rtsp.c:1841:9: Taking false branch
1839.     content = av_malloc(SDP_MAX_SIZE);
1840.     size = get_buffer(s->pb, content, SDP_MAX_SIZE - 1);
1841.     if (size <= 0) {
              ^
1842.         av_free(content);
1843.         return AVERROR_INVALIDDATA;

libavformat/rtsp.c:1845:5: 
1843.         return AVERROR_INVALIDDATA;
1844.     }
1845.     content[size] ='\0';
          ^
1846. 
1847.     sdp_parse(s, content);
