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

libavformat/rtsp.c:2016:1: start of procedure sdp_read_header()
2014. }
2015. 
2016. static int sdp_read_header(AVFormatContext *s, AVFormatParameters *ap)
      ^
2017. {
2018.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:2018:5: 
2016. static int sdp_read_header(AVFormatContext *s, AVFormatParameters *ap)
2017. {
2018.     RTSPState *rt = s->priv_data;
          ^
2019.     RTSPStream *rtsp_st;
2020.     int size, i, err;

libavformat/rtsp.c:2024:10: 
2022.     char url[1024];
2023. 
2024.     if (!ff_network_init())
               ^
2025.         return AVERROR(EIO);
2026. 

libavformat/network.h:49:1: start of procedure ff_network_init()
  47. int ff_socket_nonblock(int socket, int enable);
  48. 
  49. static inline int ff_network_init(void)
      ^
  50. {
  51. #if HAVE_WINSOCK2_H

libavformat/network.h:56:5: 
  54.         return 0;
  55. #endif
  56.     return 1;
          ^
  57. }
  58. 

libavformat/network.h:57:1: return from a call to ff_network_init
  55. #endif
  56.     return 1;
  57. }
      ^
  58. 
  59. static inline void ff_network_close(void)

libavformat/rtsp.c:2024:10: Taking false branch
2022.     char url[1024];
2023. 
2024.     if (!ff_network_init())
               ^
2025.         return AVERROR(EIO);
2026. 

libavformat/rtsp.c:2029:5: 
2027.     /* read the whole sdp file */
2028.     /* XXX: better loading */
2029.     content = av_malloc(SDP_MAX_SIZE);
          ^
2030.     size = get_buffer(s->pb, content, SDP_MAX_SIZE - 1);
2031.     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:2030:5: Skipping get_buffer(): empty list of specs
2028.     /* XXX: better loading */
2029.     content = av_malloc(SDP_MAX_SIZE);
2030.     size = get_buffer(s->pb, content, SDP_MAX_SIZE - 1);
          ^
2031.     if (size <= 0) {
2032.         av_free(content);

libavformat/rtsp.c:2031:9: Taking false branch
2029.     content = av_malloc(SDP_MAX_SIZE);
2030.     size = get_buffer(s->pb, content, SDP_MAX_SIZE - 1);
2031.     if (size <= 0) {
              ^
2032.         av_free(content);
2033.         return AVERROR_INVALIDDATA;

libavformat/rtsp.c:2035:5: 
2033.         return AVERROR_INVALIDDATA;
2034.     }
2035.     content[size] ='\0';
          ^
2036. 
2037.     sdp_parse(s, content);
