shell32: Don't access uninitialized buffer (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
333c5bd9dd
commit
3c6cbc2f91
|
@ -4735,6 +4735,7 @@ HRESULT WINAPI SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, DWORD flags, HANDLE t
|
||||||
hr = E_INVALIDARG;
|
hr = E_INVALIDARG;
|
||||||
break;
|
break;
|
||||||
case CSIDL_Type_NonExistent:
|
case CSIDL_Type_NonExistent:
|
||||||
|
*tempW = 0;
|
||||||
hr = S_FALSE;
|
hr = S_FALSE;
|
||||||
break;
|
break;
|
||||||
case CSIDL_Type_WindowsPath:
|
case CSIDL_Type_WindowsPath:
|
||||||
|
@ -4785,15 +4786,19 @@ HRESULT WINAPI SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, DWORD flags, HANDLE t
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expand environment strings if necessary */
|
|
||||||
if (*tempW == '%')
|
|
||||||
hr = _SHExpandEnvironmentStrings(tempW, pathW);
|
|
||||||
else
|
|
||||||
strcpyW(pathW, tempW);
|
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
goto failed;
|
goto failed;
|
||||||
|
|
||||||
|
/* Expand environment strings if necessary */
|
||||||
|
if (*tempW == '%')
|
||||||
|
{
|
||||||
|
hr = _SHExpandEnvironmentStrings(tempW, pathW);
|
||||||
|
if (FAILED(hr))
|
||||||
|
goto failed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
strcpyW(pathW, tempW);
|
||||||
|
|
||||||
/* if we don't care about existing directories we are ready */
|
/* if we don't care about existing directories we are ready */
|
||||||
if (flags & KF_FLAG_DONT_VERIFY) goto done;
|
if (flags & KF_FLAG_DONT_VERIFY) goto done;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue