aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2015-04-04 16:21:40 +0530
committerMichael Niedermayer <michaelni@gmx.at>2015-04-04 13:38:34 +0200
commit4b030025278ac4adc3616510f36de4c7a113c5fb (patch)
treed6ef81916ac572620386d1b86c71666541df3e56
parentf0c85d9b996695a8b5d34391caa9f2204de65a13 (diff)
downloadffmpeg-4b030025278ac4adc3616510f36de4c7a113c5fb.tar.gz
avformat/rtsp: Fix null pointer dereference
This fixes CID 1257827. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/rtsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 68ef36e131..c9871ce120 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -2259,6 +2259,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);