wininet: ftp.c Fix crash if input buffer is larger than MAX_PATH

Phil Lodwick Phil.Lodwick at EFI.COM
Wed Jun 7 14:35:16 CDT 2006

The following windows code would crash:

CString root;
CFtpConnection ftp;


as well as:

char root[2048];
DWORD len = 2048;
ftp->GetCurrentDirectory(root, &len);

Because the implementation of FtpGetCurrentDirectoryA was using a buffer off
the stack of size MAX_PATH.  (It eventually calls ZeroMemory on this buffer)


    Fix crash when calling FtpGetCurrentDirectoryA with a buffer larger than
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 1388 bytes
Desc: patch.diff
Url :

More information about the wine-patches mailing list