Dmitry Timoshkov : adsldp: Require attribute definition to be properly terminated.

Alexandre Julliard julliard at winehq.org
Mon Mar 30 16:24:27 CDT 2020


Module: wine
Branch: master
Commit: 2c86658e6ab04f6a61f6970558b3c37c6daf4611
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2c86658e6ab04f6a61f6970558b3c37c6daf4611

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Mar 30 15:57:43 2020 +0800

adsldp: Require attribute definition to be properly terminated.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 32b11a361a..06e61f258a 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)




More information about the wine-cvs mailing list