wininet: Check for null parameters in FtpSetCurrentDirectoryW.
This commit is contained in:
parent
5fb6e0ef16
commit
35f0965c43
|
@ -339,10 +339,16 @@ BOOL WINAPI FtpSetCurrentDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory)
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
|
BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
|
||||||
{
|
{
|
||||||
LPWININETFTPSESSIONW lpwfs;
|
LPWININETFTPSESSIONW lpwfs = NULL;
|
||||||
LPWININETAPPINFOW hIC = NULL;
|
LPWININETAPPINFOW hIC = NULL;
|
||||||
BOOL r = FALSE;
|
BOOL r = FALSE;
|
||||||
|
|
||||||
|
if (!lpszDirectory)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
goto lend;
|
||||||
|
}
|
||||||
|
|
||||||
lpwfs = (LPWININETFTPSESSIONW) WININET_GetObject( hConnect );
|
lpwfs = (LPWININETFTPSESSIONW) WININET_GetObject( hConnect );
|
||||||
if (NULL == lpwfs || WH_HFTPSESSION != lpwfs->hdr.htype)
|
if (NULL == lpwfs || WH_HFTPSESSION != lpwfs->hdr.htype)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue