Re: [libav-devel] [PATCH] cook: clip quant_index values to [-63, 63] range.

2012-02-29 Thread Christophe Gisquet
2012/2/29 Ronald S. Bultje : > -        quant_index_table[i] = quant_index_table[i - 1] + j - 12; // > differential encoding > +        quant_index_table[i] = av_clip(quant_index_table[i - 1] + j - 12, > -63, 63); // differential encoding It seems those values are used to determine bit length of

[libav-devel] [PATCH] cook: clip quant_index values to [-63, 63] range.

2012-02-29 Thread Ronald S. Bultje
From: "Ronald S. Bultje" It is used as an index in a table of that size, therefore larger values should not be allowed since they lead to stack overreads. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-sta...@libav.org --- libavcodec/cook.c |2 +- 1 files changed, 1 insert