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

Alexandre Julliard julliard at winehq.org
Fri Aug 7 10:42:30 CDT 2020


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

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>
(cherry picked from commit dcc6a143e96ce7b500af2746834943ec346fe6b6)
Signed-off-by: Michael Stefaniuc <mstefani 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 8969abd8ee..ddff3367f3 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -4161,7 +4161,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