aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lynch <mtlynch@google.com>2014-10-14 16:30:39 -0400
committerMichael Niedermayer <michaelni@gmx.at>2014-10-15 20:04:32 +0200
commitc69f230a3afbfa30d7a978a6961b1ddcc774499f (patch)
tree904c7e38a5715074d80df88849157650c3f7b428
parent8a9537999029498332a68fc0edf98821969329d6 (diff)
downloadffmpeg-c69f230a3afbfa30d7a978a6961b1ddcc774499f.tar.gz
avformat/rtsp: check memory allocation
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Commit message by: Benoit Fouet <benoit.fouet@free.fr> 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 523a7c0439..77f03bac30 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1150,6 +1150,8 @@ start:
if (content_length > 0) {
/* leave some room for a trailing '\0' (useful for simple parsing) */
content = av_malloc(content_length + 1);
+ if (!content)
+ return AVERROR(ENOMEM);
ffurl_read_complete(rt->rtsp_hd, content, content_length);
content[content_length] = '\0';
}