diff options
author | Michael Niedermayer <[email protected]> | 2020-04-21 00:03:39 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2020-07-01 13:33:44 +0200 |
commit | 101f32f843bf108c6d37d8854568927f6082245c (patch) | |
tree | 8c607f9e32285025ee5e8624813accb00ef0deb9 | |
parent | 2f487066ed63dfa42640b94fec79f2905e3216b7 (diff) |
avcodec/iff: Fix invalid pointer intermediates in decode_deep_rle32()
Reviewed-by: Peter Ross <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit bc41a29a5aa3c3dedba0a85b4aeb79a07eeeb1b4)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavcodec/iff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 72e3ae73b2..76ad63d102 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -715,7 +715,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) { |