"Alexander Morozov" amorozov@etersoft.ru wrote:
- if (ReferenceString && lstrlenW(ReferenceString)) { /* space for a hash between string and reference string: */ len += lstrlenW(ReferenceString) + 1;
@@ -258,10 +258,10 @@ static LPWSTR SETUPDI_CreateSymbolicLink /* replace '\' with '#' after the "\\?\" beginning */ for (ptr = strchrW(ret + 4, '\'); ptr; ptr = strchrW(ptr + 1, '\')) *ptr = '#';
if (ReferenceString)
if (ReferenceString && lstrlenW(ReferenceString))
Calling lstrlenW on ReferenceString is not needed, checking *ReferenceString is enough.