mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 12:50:49 +08:00
avutil/error: Fix overflow when negating
-INT_MIN is not representable in an int. Fixes issue #22388. Reviewed-by: Sean McGovern <gseanmcg@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user