OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a67b679
)
wmv2enc: Check memory allocation
author
Vittorio Giovara
<vittorio.giovara@gmail.com>
Fri, 24 Jul 2015 03:24:33 +0000
(
04:24
+0100)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Mon, 27 Jul 2015 13:44:07 +0000
(14:44 +0100)
libavcodec/wmv2enc.c
patch
|
blob
|
history
diff --git
a/libavcodec/wmv2enc.c
b/libavcodec/wmv2enc.c
index
e4e51d3
..
e4d4159
100644
(file)
--- 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;