diff options
author | Michael Lynch <mtlynch@google.com> | 2014-10-14 16:30:39 -0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-10-16 09:19:03 +0300 |
commit | 460b509a34fb5fad3bedac8429f53594d3923ea8 (patch) | |
tree | 81d8ab5e1b174b01bdb864089908ef16b21577f6 | |
parent | 79dd756e143a54efc25d64e90505f0dca6cbc4ec (diff) | |
download | ffmpeg-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.c | 2 |
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'; } |