summaryrefslogtreecommitdiff
path: root/libavcodec/iff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-04-21 00:03:39 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-04-22 22:57:38 +0200
commitbc41a29a5aa3c3dedba0a85b4aeb79a07eeeb1b4 (patch)
tree7784e25964011401241698c8260387dbfb2c0b0d /libavcodec/iff.c
parent64b80cb04b124eaa979128f0b8557ee2a5ca239b (diff)
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>
Diffstat (limited to 'libavcodec/iff.c')
-rw-r--r--libavcodec/iff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index acd6519b06..2e65e266d0 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) {