diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2016-06-25 18:24:12 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-06-25 18:28:06 +0200 |
commit | d96b8144c0058586d3c3472de2621d105f0aa620 (patch) | |
tree | d53bd4472e449acfe5ca90c7757568e473f8ac45 | |
parent | 1e38791b7f8eb2324fa21031b0822942cfdd5e3b (diff) | |
download | ffmpeg-d96b8144c0058586d3c3472de2621d105f0aa620.tar.gz |
avcodec/exr: add missed hunks from previous exr commit
-rw-r--r-- | libavcodec/exr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 05e72d8440..c87187c05c 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -980,12 +980,19 @@ static int b44_uncompress(EXRContext *s, const uint8_t *src, int compressed_size } target_channel_offset += 2; } else {/* Float or UINT 32 channel */ + if (stayToUncompress < td->ysize * td->xsize * 4) { + av_log(s, AV_LOG_ERROR, "Not enough data for uncompress channel: %d", stayToUncompress); + return AVERROR_INVALIDDATA; + } + for (y = 0; y < td->ysize; y++) { indexOut = target_channel_offset * td->xsize + y * td->channel_line_size; memcpy(&td->uncompressed_data[indexOut], sr, td->xsize * 4); sr += td->xsize * 4; } target_channel_offset += 4; + + stayToUncompress -= td->ysize * td->xsize * 4; } } |