Rob Shearman : shell32: Fix character count passed into lstrcpnA in SHGetDataFromIDListA.

Alexandre Julliard julliard at winehq.org
Sat Feb 16 09:57:25 CST 2008


Module: wine
Branch: master
Commit: d92fe2cbfcf6d69531dddc3be64f6120589ef4f0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d92fe2cbfcf6d69531dddc3be64f6120589ef4f0

Author: Rob Shearman <rob at codeweavers.com>
Date:   Fri Feb 15 10:06:13 2008 +0000

shell32: Fix character count passed into lstrcpnA in SHGetDataFromIDListA.

---

 dlls/shell32/pidl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index 18bfebf..58cb080 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -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;




More information about the wine-cvs mailing list