diff options
author | Michael Niedermayer <[email protected]> | 2020-04-21 00:03:39 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2020-04-23 21:29:01 +0200 |
commit | 0516f88c76ea96f23238ed6ae0cd93ef3fb4672f (patch) | |
tree | 32fce3357ddbad5f53450b800d3dac954996eb05 | |
parent | 9a636c5a7614d3d2cff04af3356740ca0faca19e (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 e5a75bd617..7f8f868ba9 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -590,7 +590,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) { |