Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-06 16:06:42 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-04-06 16:06:42 +0300
commita66dcfeedc68c080965cf78e1e0694967acef5af (patch)
treeacee75527e1b3fdb111f311ff7e63bbff5b01283 /libavcodec
parent34bddf443c6fb1f02d73746cccf8e7b3f9f0dbb2 (diff)
avcodec/vc1dec: Check buf2 for malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1dec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 70694471ce..6c47d45dbd 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) {