diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-15 13:48:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-15 13:48:04 +0100 |
commit | 70c0ae915d51b0f846f690e0895f18b95f038d9a (patch) | |
tree | 2caffb0f0d84c1e19c8a0fe79a6feea5ffd4451b | |
parent | 2265bb93ffc4b491fefb491c04f919441be0c952 (diff) | |
download | ffmpeg-70c0ae915d51b0f846f690e0895f18b95f038d9a.tar.gz |
matroskadec: avoid integer overflow
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/matroskadec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index dd61962127..26b218663b 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1638,7 +1638,7 @@ static int matroska_read_header(AVFormatContext *s) && (track->codec_priv.data != NULL)) { fourcc = AV_RL32(track->codec_priv.data); codec_id = ff_codec_get_id(ff_codec_movvideo_tags, fourcc); - } else if (codec_id == AV_CODEC_ID_ALAC && track->codec_priv.size && track->codec_priv.size < INT_MAX-12) { + } else if (codec_id == AV_CODEC_ID_ALAC && track->codec_priv.size && track->codec_priv.size < INT_MAX - 12 - FF_INPUT_BUFFER_PADDING_SIZE) { /* Only ALAC's magic cookie is stored in Matroska's track headers. Create the "atom size", "tag", and "tag version" fields the decoder expects manually. */ |