Commit be403aac authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winhttp: Fix digit character check in parse_port.

parent 5a44fc7b
...@@ -158,7 +158,7 @@ static DWORD parse_port( const WCHAR *str, DWORD len, INTERNET_PORT *ret ) ...@@ -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--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment