[FFmpeg-cvslog] avcodec/vc1dec: Check buf2 for malloc failure
Michael Niedermayer
git at videolan.org
Mon Apr 6 15:14:29 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 6 15:06:42 2015 +0200| [a66dcfeedc68c080965cf78e1e0694967acef5af] | committer: Michael Niedermayer
avcodec/vc1dec: Check buf2 for malloc failure
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a66dcfeedc68c080965cf78e1e0694967acef5af
---
libavcodec/vc1dec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 7069447..6c47d45 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -483,6 +483,9 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
}
buf2 = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!buf2)
+ return AVERROR(ENOMEM);
+
start = find_next_marker(start, end); // in WVC1 extradata first byte is its size, but can be 0 in mkv
next = start;
for (; next < end; start = next) {
More information about the ffmpeg-cvslog
mailing list