Commit 009b8dd5 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

localui: Avoid crash on NULL pointer.

parent 7aa1b2e4
......@@ -50,11 +50,11 @@ static LPWSTR strdupWW(LPCWSTR pPrefix, LPCWSTR pSuffix)
LPWSTR ptr;
DWORD len;
len = lstrlenW(pPrefix) + lstrlenW(pSuffix) + 1;
len = lstrlenW(pPrefix) + (pSuffix ? lstrlenW(pSuffix) : 0) + 1;
ptr = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (ptr) {
lstrcpyW(ptr, pPrefix);
lstrcatW(ptr, pSuffix);
if (pSuffix) lstrcatW(ptr, pSuffix);
}
return ptr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment