aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-11-05 00:36:59 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-19 03:51:38 +0100
commit139a96b6ebf3a197e2dcfe93991992327266e2b6 (patch)
tree62bc1252b68c28bf8013825137d70aab7186918f /libavcodec/ffv1dec.c
parentdd6274d904acd0f173dfeb30b469ade5fc953b4e (diff)
downloadffmpeg-139a96b6ebf3a197e2dcfe93991992327266e2b6.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) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1dec.c')
-rw-r--r--libavcodec/ffv1dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 14eef9af9b..b920be5c10 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -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++) {