From 5d3ad4f06e936eb6d2cb964cce31afef7bed32d3 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt 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. Reviewed-by: Sean McGovern Signed-off-by: Andreas Rheinhardt --- 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