avcodec/exr: check rle() return value in rle_uncompress()

rle_uncompress() silently discards the return value of rle(). When the
compressed data is malformed and rle() returns AVERROR_INVALIDDATA,
processing continues on a partially filled buffer. Propagate the error
to the caller, which already handles it at line 1420.

Signed-off-by: João Neves <joaocns0@protonmail.com>
This commit is contained in:
João Neves
2026-04-08 12:56:50 -07:00
committed by Marton Balint
parent 1e9dd2b7e9
commit daedf4012d
+3 -1
View File
@@ -267,7 +267,9 @@ static int rle(uint8_t *dst, const uint8_t *src,
static int rle_uncompress(const EXRContext *ctx, const uint8_t *src, int compressed_size,
int uncompressed_size, EXRThreadData *td)
{
rle(td->tmp, src, compressed_size, uncompressed_size);
int ret = rle(td->tmp, src, compressed_size, uncompressed_size);
if (ret < 0)
return ret;
av_assert1(uncompressed_size % 2 == 0);