1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-07-09 01:31:41 +02:00
parent 30659a2233
commit 7bc155163e

View File

@ -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--) {