diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-09 01:31:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-09 01:33:44 +0200 |
commit | 7bc155163ec08a0302526d7e19d08c8053f932f0 (patch) | |
tree | 2c87d925d80d98228abb91ffce2d8221e48d564c | |
parent | 30659a2233772f9dfcda3a9928b93bba00308687 (diff) | |
download | ffmpeg-7bc155163ec08a0302526d7e19d08c8053f932f0.tar.gz |
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>
-rw-r--r-- | libavcodec/sgidec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c index 4e8fd31ef1..f11efd05ee 100644 --- a/libavcodec/sgidec.c +++ b/libavcodec/sgidec.c @@ -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--) { |