[FFmpeg-cvslog] rtpdec_qt: Add an accidentally removed allocation return value check

Martin Storsjö git at videolan.org
Fri Sep 27 11:45:14 CEST 2013


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Sep 26 16:34:59 2013 +0300| [1af78b865b66acb8020c54262f12aa41ad47e05c] | committer: Martin Storsjö

rtpdec_qt: Add an accidentally removed allocation return value check

This check was mistakenly removed in 5626f994f.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1af78b865b66acb8020c54262f12aa41ad47e05c
---

 libavformat/rtpdec_qt.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index 146002a..8898f05 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;
         }



More information about the ffmpeg-cvslog mailing list