PR #22757 opened by joaonevess URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22757 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22757.patch
The LZMA variant was fixed in f48b6b8b91 (CID1348138) by performing the width * lines multiply as uint64_t. The zlib variant was missed. The error log on line 544 in the same function already uses the correct cast: (unsigned long)width * lines. Signed-off-by: João Neves <[email protected]> From 3d5d0090e7bcd185f5dfccc84738db4df39f771e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neves?= <[email protected]> Date: Wed, 8 Apr 2026 13:23:21 -0700 Subject: [PATCH] avcodec/tiff: widen multiply in tiff_unpack_zlib() to unsigned long MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The LZMA variant was fixed in f48b6b8b91 (CID1348138) by performing the width * lines multiply as uint64_t. The zlib variant was missed. The error log on line 544 in the same function already uses the correct cast: (unsigned long)width * lines. Signed-off-by: João Neves <[email protected]> --- libavcodec/tiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index bb8120bc1b..59a23d604a 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -526,7 +526,7 @@ static int tiff_unpack_zlib(TiffContext *s, AVFrame *p, uint8_t *dst, int stride uint8_t *zbuf; unsigned long outlen; int ret, line; - outlen = width * lines; + outlen = (unsigned long)width * lines; zbuf = av_malloc(outlen); if (!zbuf) return AVERROR(ENOMEM); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
