You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-06 08:29:25 +02:00
eatgv: check vector_bits
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
This commit is contained in:
committed by
Kostya Shishkov
parent
a390aa0ea4
commit
71a3c59ed7
@@ -154,6 +154,12 @@ static int tgv_decode_inter(TgvContext * s, const uint8_t *buf, const uint8_t *b
|
||||
vector_bits = AV_RL16(&buf[6]);
|
||||
buf += 12;
|
||||
|
||||
if (vector_bits > MIN_CACHE_BITS || !vector_bits) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"Invalid value for motion vector bits: %d\n", vector_bits);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* allocate codebook buffers as necessary */
|
||||
if (num_mvs > s->num_mvs) {
|
||||
s->mv_codebook = av_realloc(s->mv_codebook, num_mvs*2*sizeof(int));
|
||||
|
||||
Reference in New Issue
Block a user