[SETUPAPI] Fix absolute dirid ProfileItems bug (#7016)

This commit is contained in:
Whindmar Saksit 2024-06-12 19:34:48 +02:00 committed by GitHub
parent 13b6972500
commit 4321c975c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -844,8 +844,10 @@ static BOOL Concatenate(int DirId, LPCWSTR SubDirPart, LPCWSTR NamePart, LPWSTR
*pFullName = NULL;
Dir = DIRID_get_string(DirId);
if (Dir)
if (Dir && *Dir)
dwRequired += wcslen(Dir) + 1;
else
Dir = NULL; /* DIRID_get_string returns L"" for DIRID_ABSOLUTE */
if (SubDirPart)
dwRequired += wcslen(SubDirPart) + 1;
if (NamePart)