[SETUPAPI] profile_items_callback(): Check LinkName (#2049)

CORE-11612
This commit is contained in:
Serge Gautherie 2019-11-27 01:48:32 +01:00 committed by Hermès BÉLUSCA - MAÏTO
parent 9d1ce7c35c
commit c741b1c185

View 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