sgi: set the row boundary to the correct value
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Aug 2012 03:31:14 +0000 (05:31 +0200)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 31 Mar 2014 23:18:55 +0000 (01:18 +0200)
libavcodec/sgidec.c

index 112a181..7c751f6 100644 (file)
@@ -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;
             }