projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f296009
)
bink demuxer: check malloc return value
author
Anton Khirnov
<anton@khirnov.net>
Thu, 31 Jan 2013 20:02:06 +0000
(21:02 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Fri, 1 Feb 2013 11:41:38 +0000
(12:41 +0100)
libavformat/bink.c
patch
|
blob
|
history
diff --git
a/libavformat/bink.c
b/libavformat/bink.c
index
5d3de14
..
62c377d
100644
(file)
--- a/
libavformat/bink.c
+++ b/
libavformat/bink.c
@@
-116,6
+116,8
@@
static int read_header(AVFormatContext *s)
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = AV_CODEC_ID_BINKVIDEO;
vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!vst->codec->extradata)
+ return AVERROR(ENOMEM);
vst->codec->extradata_size = 4;
avio_read(pb, vst->codec->extradata, 4);