Commit 00ab9cda authored by Michael Niedermayer's avatar Michael Niedermayer

jpeglsdec: Prevent out of array write.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent dda713f8
......@@ -198,6 +198,9 @@ static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s, void *
r = ff_log2_run[state->run_index[comp]];
if(r)
r = get_bits_long(&s->gb, r);
if(x + r * stride > w) {
r = (w - x) / stride;
}
for(i = 0; i < r; i++) {
W(dst, x, Ra);
x += stride;
......
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