From c741b1c185def384fb432710960b6c486e58c597 Mon Sep 17 00:00:00 2001 From: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> Date: Wed, 27 Nov 2019 01:48:32 +0100 Subject: [PATCH] [SETUPAPI] profile_items_callback(): Check LinkName (#2049) CORE-11612 --- dll/win32/setupapi/install.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dll/win32/setupapi/install.c b/dll/win32/setupapi/install.c index 9527ad32067..f8c4b53e46c 100644 --- a/dll/win32/setupapi/install.c +++ b/dll/win32/setupapi/install.c @@ -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