1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-05 23:58:59 +02:00

avcodec/exr: add missed hunks from previous exr commit

This commit is contained in:
Martin Vignali 2016-06-25 18:24:12 +02:00 committed by Paul B Mahol
parent 1e38791b7f
commit d96b8144c0

View File

@ -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;
}
}