aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lynch <mtlynch@google.com>2014-10-14 16:30:39 -0400
committerMartin Storsjö <martin@martin.st>2014-10-16 09:19:03 +0300
commit460b509a34fb5fad3bedac8429f53594d3923ea8 (patch)
tree81d8ab5e1b174b01bdb864089908ef16b21577f6
parent79dd756e143a54efc25d64e90505f0dca6cbc4ec (diff)
downloadffmpeg-460b509a34fb5fad3bedac8429f53594d3923ea8.tar.gz
rtsp: Check a memory allocation
CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/rtsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index d574797199..52f52a1056 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1146,6 +1146,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';
}