Commit bfa2c5ea authored by Erich Hoover's avatar Erich Hoover Committed by Alexandre Julliard

crypt32: Fix domain component length check.

parent d56070a2
...@@ -3162,6 +3162,11 @@ static BOOL match_domain_component(LPCWSTR allowed_component, DWORD allowed_len, ...@@ -3162,6 +3162,11 @@ static BOOL match_domain_component(LPCWSTR allowed_component, DWORD allowed_len,
BOOL matches = TRUE; BOOL matches = TRUE;
*see_wildcard = FALSE; *see_wildcard = FALSE;
/* permit server_len to be one byte short if allowed_component is NULL terminated */
if(allowed_component[allowed_len-1] == 0)
allowed_len--;
if (server_len < allowed_len) if (server_len < allowed_len)
{ {
WARN_(chain)("domain component %s too short for %s\n", WARN_(chain)("domain component %s too short for %s\n",
......
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