mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
avcodec/psd: reject an uncompressed image size above INT_MAX
Fixes: out of array write Fixes: MymIHidCHVJu Fixes: AISLE-2026-0150-00348 Out of array write Replicated through UnModified FFmpeg (32-bit) with ASAN Found-by: Joshua Rogers (AISLE)
This commit is contained in:
1 parent
62c308e041
commit
aa4b80b54e
1 file changed
+2
@@ -444,6 +444,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
|
||||
}
|
||||
|
||||
s->uncompressed_size = s->line_size * s->height * s->channel_count;
|
||||
if (s->uncompressed_size > INT_MAX)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
/* decode picture if need */
|
||||
if (s->compression == PSD_RLE) {
|
||||
|
||||
Reference in new issue
Block a user