aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp9.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-06-07 18:50:43 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-20 04:43:40 +0200
commitc10871aca817398cdbea39e06f87a85911953bad (patch)
tree2191647f50a5504aeb7ed79176618d4847137bad /libavcodec/vp9.c
parentb477f97ab984ba31c3c75481b5572f0352ff0772 (diff)
downloadffmpeg-c10871aca817398cdbea39e06f87a85911953bad.tar.gz
vp9: change type of tile_size from unsigned to int64_t
Otherwise the check 'tile_size < size' treats a negative size as unsigned, causing the check to pass. This subsequently leads to segmentation faults. This was originally fixed as part of Libav commit 72ca83, so the original author is one of the following developers: Anton Khirnov <anton@khirnov.net> Diego Biurrun <diego@biurrun.de> Luca Barbato <lu_zero@gentoo.org> Martin Storsjö <martin@martin.st> Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit b18eac7ff22332c9344769af15f7b245dd13cc64) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp9.c')
-rw-r--r--libavcodec/vp9.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 970329ffe5..abf6f94972 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -3868,7 +3868,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
tile_row, s->tiling.log2_tile_rows, s->sb_rows);
if (s->pass != 2) {
for (tile_col = 0; tile_col < s->tiling.tile_cols; tile_col++) {
- unsigned tile_size;
+ int64_t tile_size;
if (tile_col == s->tiling.tile_cols - 1 &&
tile_row == s->tiling.tile_rows - 1) {