mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 01:25:25 +00:00
eacmv: check for out of bound reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit 46cb2f6a29
)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
34d6f22a57
commit
d75c80e942
@ -153,6 +153,9 @@ static int cmv_decode_frame(AVCodecContext *avctx,
|
||||
CmvContext *s = avctx->priv_data;
|
||||
const uint8_t *buf_end = buf + buf_size;
|
||||
|
||||
if (buf_end - buf < EA_PREAMBLE_SIZE)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (AV_RL32(buf)==MVIh_TAG||AV_RB32(buf)==MVIh_TAG) {
|
||||
cmv_process_header(s, buf+EA_PREAMBLE_SIZE, buf_end);
|
||||
return buf_size;
|
||||
|
Loading…
Reference in New Issue
Block a user