avformat/dv: check av_malloc() return code
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 23 Jan 2015 17:15:43 +0000 (18:15 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 23 Jan 2015 17:15:43 +0000 (18:15 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/dv.c

index 0a893f4..3243ca2 100644 (file)
@@ -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;