[FFmpeg-cvslog] wmv2enc: Check memory allocation
Vittorio Giovara
git at videolan.org
Mon Jul 27 20:51:21 CEST 2015
ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Fri Jul 24 04:24:33 2015 +0100| [03eb55741427c6608f63972c105e565ca0ba4f15] | committer: Vittorio Giovara
wmv2enc: Check memory allocation
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=03eb55741427c6608f63972c105e565ca0ba4f15
---
libavcodec/wmv2enc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c
index e4e51d3..e4d4159 100644
--- a/libavcodec/wmv2enc.c
+++ b/libavcodec/wmv2enc.c
@@ -63,6 +63,9 @@ static av_cold int wmv2_encode_init(AVCodecContext *avctx)
avctx->extradata_size = 4;
avctx->extradata = av_mallocz(avctx->extradata_size + 10);
+ if (!avctx->extradata)
+ return AVERROR(ENOMEM);
+
encode_ext_header(w);
return 0;
More information about the ffmpeg-cvslog
mailing list