[FFmpeg-cvslog] avcodec/sgidec: fix linesize for 16bit

Michael Niedermayer git at videolan.org
Sat Nov 1 14:33:30 CET 2014


ffmpeg | branch: release/2.3 | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 27 20:48:58 2014 +0100| [4a03c31728c833f8d4a959f6de4837234560ca3d] | committer: Michael Niedermayer

avcodec/sgidec: fix linesize for 16bit

Fixes: asan_heap-oob_22b30d4_39_038.sgi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 3b20ed85489a14cb5028c873d06960dbc5eef88a)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a03c31728c833f8d4a959f6de4837234560ca3d
---

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

diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 6f51ec3..8338863 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -145,7 +145,7 @@ static int read_rle_sgi(uint8_t *out_buf, SgiState *s)
     for (z = 0; z < s->depth; z++) {
         dest_row = out_buf;
         for (y = 0; y < s->height; y++) {
-            linesize = s->width * s->depth * s->bytes_per_channel;
+            linesize = s->width * s->depth;
             dest_row -= s->linesize;
             start_offset = bytestream2_get_be32(&g_table);
             bytestream2_seek(&s->g, start_offset, SEEK_SET);



More information about the ffmpeg-cvslog mailing list