Browse code

matroskadec: fix out of bounds write

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit 723229c11f1400e6a09c8a1c9c27193f376eb1d1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d51c7b4cbe022f6b3b026735dc7e29eb50bbf129)

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

Ronald S. Bultje authored on 2011/10/15 07:03:55
Showing 1 changed files
... ...
@@ -1641,7 +1641,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
1641 1641
                         lace_size[n] = lace_size[n - 1] + snum;
1642 1642
                         total += lace_size[n];
1643 1643
                     }
1644
-                    lace_size[n] = size - total;
1644
+                    lace_size[laces - 1] = size - total;
1645 1645
                     break;
1646 1646
                 }
1647 1647
             }