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;

ftp->GetCurrentDirectory(root)

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)

==============================================

ChangeLog:
    Fix crash when calling FtpGetCurrentDirectoryA with a buffer larger than
MAX_PATH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 1388 bytes
Desc: patch.diff
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060607/04f60628/patch.obj


More information about the wine-patches mailing list