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:
c2dd01c
)
bink: check av_mallocz() return value
author
Paul B Mahol
<onemda@gmail.com>
Sat, 9 Jun 2012 10:57:14 +0000
(10:57 +0000)
committer
Paul B Mahol
<onemda@gmail.com>
Sat, 9 Jun 2012 10:57:14 +0000
(10:57 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/bink.c
patch
|
blob
|
history
diff --git
a/libavformat/bink.c
b/libavformat/bink.c
index
20cf609
..
5eb2211
100644
(file)
--- a/
libavformat/bink.c
+++ b/
libavformat/bink.c
@@
-115,6
+115,8
@@
static int read_header(AVFormatContext *s)
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = 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);