Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
35759184
Commit
35759184
authored
Jun 07, 2006
by
Phil Lodwick
Committed by
Alexandre Julliard
Jun 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: ftp: Fix crash if input buffer is larger than MAX_PATH.
parent
5ea41cc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
ftp.c
dlls/wininet/ftp.c
+16
-3
No files found.
dlls/wininet/ftp.c
View file @
35759184
...
...
@@ -746,16 +746,29 @@ lend:
BOOL
WINAPI
FtpGetCurrentDirectoryA
(
HINTERNET
hFtpSession
,
LPSTR
lpszCurrentDirectory
,
LPDWORD
lpdwCurrentDirectory
)
{
WCHAR
dir
[
MAX_PATH
]
;
WCHAR
*
dir
=
NULL
;
DWORD
len
;
BOOL
ret
;
if
(
lpdwCurrentDirectory
)
len
=
*
lpdwCurrentDirectory
;
if
(
lpdwCurrentDirectory
)
{
len
=
*
lpdwCurrentDirectory
;
if
(
lpszCurrentDirectory
)
{
dir
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
NULL
==
dir
)
{
INTERNET_SetLastError
(
ERROR_OUTOFMEMORY
);
return
FALSE
;
}
}
}
ret
=
FtpGetCurrentDirectoryW
(
hFtpSession
,
lpszCurrentDirectory
?
dir
:
NULL
,
lpdwCurrentDirectory
?&
len
:
NULL
);
if
(
lpdwCurrentDirectory
)
{
*
lpdwCurrentDirectory
=
len
;
if
(
lpszCurrentDirectory
)
if
(
lpszCurrentDirectory
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
dir
,
len
,
lpszCurrentDirectory
,
*
lpdwCurrentDirectory
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
dir
);
}
}
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment