https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c741b1c185def384fb432…
commit c741b1c185def384fb432710960b6c486e58c597
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Wed Nov 27 01:48:32 2019 +0100
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Nov 27 01:48:32 2019 +0100
[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