mirror of
https://github.com/reactos/reactos.git
synced 2025-06-14 07:08:30 +00:00
[SETUPAPI]
Fix invalid use of wcslen with NULL pointer. Should fix crash in setupapi_winetest:install. svn path=/trunk/; revision=70441
This commit is contained in:
parent
4b7f7b68f1
commit
97f52680ef
1 changed files with 4 additions and 2 deletions
|
@ -1079,7 +1079,9 @@ profile_items_callback(
|
||||||
hr = IShellLinkW_QueryInterface(psl, &IID_IPersistFile, (LPVOID*)&ppf);
|
hr = IShellLinkW_QueryInterface(psl, &IID_IPersistFile, (LPVOID*)&ppf);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
Required = (MAX_PATH + wcslen(LinkSubDir) + 1 + wcslen(LinkName)) * sizeof(WCHAR);
|
Required = (MAX_PATH + 1 +
|
||||||
|
((LinkSubDir != NULL) ? wcslen(LinkSubDir) : 0) +
|
||||||
|
((LinkName != NULL) ? wcslen(LinkName) : 0)) * sizeof(WCHAR);
|
||||||
FullLinkName = MyMalloc(Required);
|
FullLinkName = MyMalloc(Required);
|
||||||
if (!FullLinkName)
|
if (!FullLinkName)
|
||||||
hr = E_OUTOFMEMORY;
|
hr = E_OUTOFMEMORY;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue