[libav-commits] sgi: set the row boundary to the correct value

Michael Niedermayer git at libav.org
Tue Apr 1 01:27:16 CEST 2014


Module: libav
Branch: master
Commit: 6d9ccee4519f41155c88655c77bfb1ef085797fd

Author:    Michael Niedermayer <michaelni at gmx.at>
Committer: Vittorio Giovara <vittorio.giovara at gmail.com>
Date:      Sun Aug 12 05:31:14 2012 +0200

sgi: set the row boundary to the correct value

---

 libavcodec/sgidec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 112a181..7c751f6 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -106,7 +106,7 @@ static int read_rle_sgi(uint8_t *out_buf, SgiState *s)
             dest_row -= s->linesize;
             start_offset = bytestream2_get_be32(&g_table);
             bytestream2_seek(&s->g, start_offset, SEEK_SET);
-            if (expand_rle_row(s, dest_row + z, FFABS(s->linesize) - z,
+            if (expand_rle_row(s, dest_row + z, s->width * s->depth,
                                s->depth) != s->width) {
                 return AVERROR_INVALIDDATA;
             }



More information about the libav-commits mailing list