aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-27 20:48:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-01 13:28:14 +0100
commitca47574e16ca6988ad7eda56d65e1d7b4fc35878 (patch)
treeaa24108c76e355c5db23a1277d72a1498900fde1 /libavcodec
parent045670a6f7e46d2ab84df0214282bbb07e0eef9c (diff)
downloadffmpeg-ca47574e16ca6988ad7eda56d65e1d7b4fc35878.tar.gz
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@gmx.at> (cherry picked from commit 3b20ed85489a14cb5028c873d06960dbc5eef88a) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/sgidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 6f51ec3531..8338863637 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);