summaryrefslogtreecommitdiff
path: root/libavformat/a64.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-18 13:24:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-18 13:25:18 +0200
commit47a721348a5feae818127b821b6cfc47074938d7 (patch)
treead807c36e086ae63453fde398e37888acca8a596 /libavformat/a64.c
parentc7c11058abb7b08fb87636ac8be08bbf1b7fce6a (diff)
parent3ef6c5264b2590781b4ed556443ff49709dd45fb (diff)
downloadffmpeg-47a721348a5feae818127b821b6cfc47074938d7.tar.gz
Merge commit '3ef6c5264b2590781b4ed556443ff49709dd45fb'
* commit '3ef6c5264b2590781b4ed556443ff49709dd45fb': a64: check that extradata exists before reading from it Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/a64.c')
-rw-r--r--libavformat/a64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/a64.c b/libavformat/a64.c
index 613efc0d13..802235f404 100644
--- a/libavformat/a64.c
+++ b/libavformat/a64.c
@@ -34,6 +34,12 @@ static int a64_write_header(AVFormatContext *s)
0x00, //charset_lifetime (multi only)
0x00 //fps in 50/fps;
};
+
+ if (avctx->extradata_size < 4) {
+ av_log(s, AV_LOG_ERROR, "Missing extradata\n");
+ return AVERROR(EINVAL);
+ }
+
switch (avctx->codec->id) {
case AV_CODEC_ID_A64_MULTI:
header[2] = 0x00;