Module: wine Branch: refs/heads/master Commit: 35f0965c431fe800594384e161ea64e1f354330e URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=35f0965c431fe800594384e1...
Author: Mike McCormack mike@codeweavers.com Date: Fri May 12 00:47:52 2006 +0900
wininet: Check for null parameters in FtpSetCurrentDirectoryW.
---
dlls/wininet/ftp.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index aa254f6..5fde83d 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -339,10 +339,16 @@ BOOL WINAPI FtpSetCurrentDirectoryA(HINT */ BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory) { - LPWININETFTPSESSIONW lpwfs; + LPWININETFTPSESSIONW lpwfs = NULL; LPWININETAPPINFOW hIC = NULL; BOOL r = FALSE;
+ if (!lpszDirectory) + { + SetLastError(ERROR_INVALID_PARAMETER); + goto lend; + } + lpwfs = (LPWININETFTPSESSIONW) WININET_GetObject( hConnect ); if (NULL == lpwfs || WH_HFTPSESSION != lpwfs->hdr.htype) {