Module: libav Branch: release/11 Commit: b31bb39bdd7b5a53e0d282acc0f0f62b32b17acc
Author: Michael Lynch <[email protected]> Committer: Vittorio Giovara <[email protected]> Date: Tue Oct 14 16:30:39 2014 -0400 rtsp: Check a memory allocation CC: [email protected] Signed-off-by: Martin Storsjö <[email protected]> --- libavformat/rtsp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 23d7da1..4e79bc1 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'; } _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
