Browse Source

rtsp: Check a malloc return value

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n2.7
Himangi Saraogi Martin Storsjö 10 years ago
parent
commit
0b72a47f55
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/rtsp.c

+ 2
- 0
libavformat/rtsp.c View File

@@ -2239,6 +2239,8 @@ static int sdp_read_header(AVFormatContext *s)
/* read the whole sdp file */
/* XXX: better loading */
content = av_malloc(SDP_MAX_SIZE);
if (!content)
return AVERROR(ENOMEM);
size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
if (size <= 0) {
av_free(content);


Loading…
Cancel
Save