Commit 15b219fa authored by Michael Niedermayer's avatar Michael Niedermayer

jpegdec: Fix vlc table check for progressive jpegs.

Fixes Ticket834
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6072a19b
...@@ -1073,7 +1073,7 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, ...@@ -1073,7 +1073,7 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
if (s->dc_index[i] < 0 || s->ac_index[i] < 0 || if (s->dc_index[i] < 0 || s->ac_index[i] < 0 ||
s->dc_index[i] >= 4 || s->ac_index[i] >= 4) s->dc_index[i] >= 4 || s->ac_index[i] >= 4)
goto out_of_range; goto out_of_range;
if (!s->vlcs[0][s->dc_index[i]].table || !s->vlcs[1][s->ac_index[i]].table) if (!s->vlcs[0][s->dc_index[i]].table || !(s->progressive ? s->vlcs[2][s->ac_index[0]].table : s->vlcs[1][s->ac_index[i]].table))
goto out_of_range; goto out_of_range;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment