Commit 7bc15516 authored by Michael Niedermayer's avatar Michael Niedermayer

sgidec: fix off by 1 error that tested a sample too far for oob.

This led to decoding failure when linesize was too small.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 30659a22
......@@ -58,7 +58,7 @@ static int expand_rle_row(SgiState *s, uint8_t *out_buf,
}
/* Check for buffer overflow. */
if(out_buf + pixelstride * count >= out_end) return -1;
if(out_buf + pixelstride * (count-1) >= out_end) return -1;
if (pixel & 0x80) {
while (count--) {
......
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