From 2c86658e6ab04f6a61f6970558b3c37c6daf4611 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 30 Mar 2020 15:57:43 +0800 Subject: [PATCH] adsldp: Require attribute definition to be properly terminated. Signed-off-by: Dmitry Timoshkov Signed-off-by: Alexandre Julliard --- dlls/adsldp/schema.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/adsldp/schema.c b/dlls/adsldp/schema.c index 32b11a361a3..06e61f258a2 100644 --- a/dlls/adsldp/schema.c +++ b/dlls/adsldp/schema.c @@ -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) -- 2.11.4.GIT