[FFmpeg-cvslog] avformat/dv: check av_malloc() return code

Michael Niedermayer git at videolan.org
Fri Jan 23 22:11:50 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 23 18:15:43 2015 +0100| [72d99c8c2647c77e01dfc82a354d500d48258469] | committer: Michael Niedermayer

avformat/dv: check av_malloc() return code

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/dv.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/dv.c b/libavformat/dv.c
index 0a893f4..3243ca2 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;



More information about the ffmpeg-cvslog mailing list