shell32: Fix character count passed into lstrcpnA in SHGetDataFromIDListA.

This commit is contained in:
Rob Shearman 2008-02-15 10:06:13 +00:00 committed by Alexandre Julliard
parent 8aa361740e
commit d92fe2cbfc
1 changed files with 2 additions and 2 deletions

View File

@ -1125,12 +1125,12 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl,
shortname = _ILGetSTextPointer(pidl);
if (filename)
lstrcpynA(pfd->cFileName, filename, MAX_PATH);
lstrcpynA(pfd->cFileName, filename, sizeof(pfd->cFileName));
else
pfd->cFileName[0] = '\0';
if (shortname)
lstrcpynA(pfd->cAlternateFileName, shortname, MAX_PATH);
lstrcpynA(pfd->cAlternateFileName, shortname, sizeof(pfd->cAlternateFileName));
else
pfd->cAlternateFileName[0] = '\0';
return NOERROR;