[SETUPAPI] profile_items_callback(): Check LinkName (#2049)
authorSerge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
Wed, 27 Nov 2019 00:48:32 +0000 (01:48 +0100)
committerHermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Wed, 27 Nov 2019 00:48:32 +0000 (01:48 +0100)
CORE-11612

dll/win32/setupapi/install.c

index 9527ad3..f8c4b53 100644 (file)
@@ -1110,8 +1110,11 @@ profile_items_callback(
                             if (FullLinkName[wcslen(FullLinkName) - 1] != '\\')
                                 wcscat(FullLinkName, BackSlash);
                         }
-                        wcscat(FullLinkName, LinkName);
-                        wcscat(FullLinkName, DotLnk);
+                        if (LinkName)
+                        {
+                            wcscat(FullLinkName, LinkName);
+                            wcscat(FullLinkName, DotLnk);
+                        }
                         hr = IPersistFile_Save(ppf, FullLinkName, TRUE);
                     }
                     else