Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-22 21:44:12 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-05-22 22:24:50 +0400
commit30df9789a9745d8e4b1afc10d1a983bfc8816eb9 (patch)
tree5b60c848c0909d09053899ecaa72da728b97295c /libavcodec/proresdec_lgpl.c
parentdf3ee7b9a9564c1b6193f4540db6e72656296118 (diff)
proresdec: Fix end condition
Fixes out of array writes No FFmpeg release is affected by this This also fixes some artifacts Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/proresdec_lgpl.c')
-rw-r--r--libavcodec/proresdec_lgpl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
index 73a1f6c0d0..5e98d55417 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.c
@@ -496,7 +496,7 @@ static void unpack_alpha(GetBitContext *gb, uint16_t *dst, int num_coeffs,
dst[idx++] = alpha_val >> 6;
else
dst[idx++] = (alpha_val << 2) | (alpha_val >> 6);
- if (idx == num_coeffs - 1)
+ if (idx >= num_coeffs)
break;
} while (get_bits1(gb));
val = get_bits(gb, 4);