aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-04-21 00:03:39 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 12:49:26 +0200
commitbedf686d5b725604c7b3fb80cdd992892162da51 (patch)
treea9cbe6e733dccd8cc3af0cf8d58a63066ed92d17
parent5e9fa514a451dacb254bd8512486d95b83d9fabb (diff)
downloadffmpeg-bedf686d5b725604c7b3fb80cdd992892162da51.tar.gz
avcodec/iff: Fix invalid pointer intermediates in decode_deep_rle32()
Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit bc41a29a5aa3c3dedba0a85b4aeb79a07eeeb1b4) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/iff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 20b036ccdd..7164ca98c4 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -645,7 +645,7 @@ static void decode_deep_rle32(uint8_t *dst, const uint8_t *src, int src_size, in
{
const uint8_t *src_end = src + src_size;
int x = 0, y = 0, i;
- while (src + 5 <= src_end) {
+ while (src_end - src >= 5) {
int opcode;
opcode = *(int8_t *)src++;
if (opcode >= 0) {