From 72d99c8c2647c77e01dfc82a354d500d48258469 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 23 Jan 2015 18:15:43 +0100 Subject: [PATCH] avformat/dv: check av_malloc() return code Signed-off-by: Michael Niedermayer --- libavformat/dv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/dv.c b/libavformat/dv.c index 0a893f482e..3243ca2ece 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -472,6 +472,9 @@ static int dv_read_timecode(AVFormatContext *s) { partial_frame_size); RawDVContext *c = s->priv_data; + if (!partial_frame) + return AVERROR(ENOMEM); + ret = avio_read(s->pb, partial_frame, partial_frame_size); if (ret < 0) goto finish;