summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <[email protected]>2011-10-15 00:03:55 +0200
committerMichael Niedermayer <[email protected]>2011-11-06 19:49:12 +0100
commit8acc0546bbb0deacdf1e79f5486a0811840246fc (patch)
tree1f2f9f6334c0c3d9edabd51cfbe11190547dfcfd
parent36e4be0a0adc18358a59043167a55da8eac16023 (diff)
matroskadec: fix out of bounds write
Signed-off-by: Janne Grunau <[email protected]> (cherry picked from commit 723229c11f1400e6a09c8a1c9c27193f376eb1d1) Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit d51c7b4cbe022f6b3b026735dc7e29eb50bbf129) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/matroskadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index d9ffec3727..0d75c5c13f 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1641,7 +1641,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
lace_size[n] = lace_size[n - 1] + snum;
total += lace_size[n];
}
- lace_size[n] = size - total;
+ lace_size[laces - 1] = size - total;
break;
}
}