From 1af78b865b66acb8020c54262f12aa41ad47e05c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 26 Sep 2013 16:34:59 +0300 Subject: [PATCH] rtpdec_qt: Add an accidentally removed allocation return value check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This check was mistakenly removed in 5626f994f. Signed-off-by: Martin Storsjö --- libavformat/rtpdec_qt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c index 146002aefa..8898f050c5 100644 --- a/libavformat/rtpdec_qt.c +++ b/libavformat/rtpdec_qt.c @@ -180,6 +180,8 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, av_freep(&qt->pkt.data); av_init_packet(&qt->pkt); qt->pkt.data = av_malloc(alen + FF_INPUT_BUFFER_PADDING_SIZE); + if (!qt->pkt.data) + return AVERROR(ENOMEM); qt->pkt.size = 0; qt->timestamp = *timestamp; }