jpeg: Fix an overflow when decoding images for non-color targets.
(Warning raised by GCC 4.9.4 -Os) Change-Id: I1d2f491c8bdb11fe89ffb119e248ca0f4eb69de2
This commit is contained in:
parent
191ffe272b
commit
c0ebbd4ccb
1 changed files with 8 additions and 1 deletions
|
@ -1541,7 +1541,14 @@ INLINE void fix_huff_tables(struct jpeg *p_jpeg)
|
|||
INLINE void fix_quant_tables(struct jpeg *p_jpeg)
|
||||
{
|
||||
int shift, i, j;
|
||||
for (i = 0; i < 2; i++)
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
const int k = 2;
|
||||
#else
|
||||
const int k = 1;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < k; i++)
|
||||
{
|
||||
shift = idct_tbl[p_jpeg->v_scale[i]].scale;
|
||||
if (shift)
|
||||
|
|
Loading…
Reference in a new issue