mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/ffv1dec: Check for 0 quant tables
Fixes assertion failure
Fixes: 07ec1fc3c1cbf2d3edcd7d9b52ca156c/asan_heap-oob_13624c5_491_ecd4720a03e697ba750b235690656c8f.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5745cf799a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
dd6274d904
commit
139a96b6eb
@ -567,7 +567,7 @@ static int read_extra_header(FFV1Context *f)
|
||||
}
|
||||
|
||||
f->quant_table_count = get_symbol(c, state, 0);
|
||||
if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES)
|
||||
if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES || !f->quant_table_count)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
for (i = 0; i < f->quant_table_count; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user