mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +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:
parent
30659a2233
commit
7bc155163e
@ -58,7 +58,7 @@ static int expand_rle_row(SgiState *s, uint8_t *out_buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check for buffer overflow. */
|
/* 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) {
|
if (pixel & 0x80) {
|
||||||
while (count--) {
|
while (count--) {
|
||||||
|
Loading…
Reference in New Issue
Block a user