adsldp: Require attribute definition to be properly terminated.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Dmitry Timoshkov 2020-03-30 15:57:43 +08:00 committed by Alexandre Julliard
parent 1a27b6e527
commit 2c86658e6a
1 changed files with 5 additions and 2 deletions

View File

@ -183,7 +183,7 @@ static BOOL parse_attribute_type(WCHAR *str, struct attribute_type *at)
while (*p)
{
while (is_space(*p)) p++;
if (*p == ')') break;
if (*p == ')') return TRUE;
if (!wcsnicmp(p, L"NAME", 4))
{
@ -228,7 +228,10 @@ static BOOL parse_attribute_type(WCHAR *str, struct attribute_type *at)
}
}
return TRUE;
WARN("attribute definition is not terminated\n");
free_attribute_type(at);
return FALSE;
}
struct attribute_type *load_schema(LDAP *ld, ULONG *at_count)