msvcrt: Fix range check in wsctoul().

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-11-24 12:42:03 +01:00
parent 5d48eac456
commit ad96d9195e
1 changed files with 1 additions and 1 deletions

View File

@ -2487,7 +2487,7 @@ unsigned __int64 CDECL MSVCRT__wcstoui64(const MSVCRT_wchar_t *nptr,
MSVCRT_ulong __cdecl MSVCRT__wcstoul_l(const MSVCRT_wchar_t *s,
MSVCRT_wchar_t **end, int base, MSVCRT__locale_t locale)
{
__int64 ret = MSVCRT__wcstoui64_l(s, end, base, locale);
unsigned __int64 ret = MSVCRT__wcstoui64_l(s, end, base, locale);
if(ret > MSVCRT_ULONG_MAX) {
ret = MSVCRT_ULONG_MAX;