winhttp: Fix digit character check in parse_port.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-02-07 15:07:07 +01:00 committed by Alexandre Julliard
parent 5a44fc7b81
commit be403aac21
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ static DWORD parse_port( const WCHAR *str, DWORD len, INTERNET_PORT *ret )
{ {
const WCHAR *p = str; const WCHAR *p = str;
DWORD port = 0; DWORD port = 0;
while (len && iswdigit( *p )) while (len && '0' <= *p && *p <= '9')
{ {
if ((port = port * 10 + *p - '0') > 65535) return ERROR_WINHTTP_INVALID_URL; if ((port = port * 10 + *p - '0') > 65535) return ERROR_WINHTTP_INVALID_URL;
p++; len--; p++; len--;