diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-05 00:36:59 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-12-06 14:15:27 +0100 |
commit | 58986f0fa15185e48561dc0da5b278d40a697a51 (patch) | |
tree | 889d89752b3886b3f3b7f3aab54282b887bb6e73 | |
parent | c513e721f3fb469cb8ac0888d489a0c657628d01 (diff) | |
download | ffmpeg-58986f0fa15185e48561dc0da5b278d40a697a51.tar.gz |
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 5745cf799a4389bc5d14f2b4daf32fe4631c50bc)
-rw-r--r-- | libavcodec/ffv1dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 45fb7036cb..6b785a2855 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -521,7 +521,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++) { |