Sven Baars : setupapi: Make sure the class name is always set on success in SetupDiGetINFClassW (Valgrind).

Alexandre Julliard julliard at winehq.org
Fri Apr 17 16:12:59 CDT 2020


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

Author: Sven Baars <sbaars at codeweavers.com>
Date:   Fri Apr 17 20:20:12 2020 +0200

setupapi: Make sure the class name is always set on success in SetupDiGetINFClassW (Valgrind).

Signed-off-by: Sven Baars <sbaars at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/setupapi/devinst.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 9fb8699895..5bd2b88a02 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -4188,7 +4188,11 @@ BOOL WINAPI SetupDiGetINFClassW(PCWSTR inf, LPGUID class_guid, PWSTR class_name,
     have_name = 0 < dret;
 
     if (dret >= MAX_PATH -1) FIXME("buffer might be too small\n");
-    if (have_guid && !have_name) FIXME("class name lookup via guid not implemented\n");
+    if (have_guid && !have_name)
+    {
+        class_name[0] = '\0';
+        FIXME("class name lookup via guid not implemented\n");
+    }
 
     if (have_name)
     {




More information about the wine-cvs mailing list