PR #22391 opened by mkver URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22391 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22391.patch
-INT_MIN is not representable in an int. Fixes issue #22388. >From 627049ea1d4368865b88103bc25025526b2618d0 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt <[email protected]> Date: Thu, 5 Mar 2026 10:51:59 +0100 Subject: [PATCH] avutil/error: Fix overflow when negating -INT_MIN is not representable in an int. Fixes issue #22388. Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavutil/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/error.c b/libavutil/error.c index 333d75e4ac..2c9f0028bd 100644 --- a/libavutil/error.c +++ b/libavutil/error.c @@ -140,7 +140,7 @@ int av_strerror(int errnum, char *errbuf, size_t errbuf_size) } } #if HAVE_STRERROR_R - int ret = AVERROR(strerror_r(AVUNERROR(errnum), errbuf, errbuf_size)); + int ret = AVERROR(strerror_r(AVUNERROR((unsigned)errnum), errbuf, errbuf_size)); #else int ret = -1; #endif -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
