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:
+1
-1
@@ -140,7 +140,7 @@ int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if HAVE_STRERROR_R
|
#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
|
#else
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user