[SHELL32]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 19 Feb 2017 13:00:12 +0000 (13:00 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 19 Feb 2017 13:00:12 +0000 (13:00 +0000)
Don't attempt to dereference a pointer after having freed it

CID 1401297

svn path=/trunk/; revision=73844

reactos/dll/win32/shell32/CShellLink.cpp

index 872e0ca..f10cf92 100644 (file)
@@ -1072,7 +1072,7 @@ HRESULT STDMETHODCALLTYPE CShellLink::GetPath(LPSTR pszFile, INT cchMaxPath, WIN
         ZeroMemory(pfd, sizeof(*pfd));
 
         /* Copy the file data if a file path was returned */
-        if (*pszFileW)
+        if (*pszFile)
         {
             /* Copy the fixed part */
             CopyMemory(pfd, &wfd, FIELD_OFFSET(WIN32_FIND_DATAA, cFileName));
@@ -3050,4 +3050,4 @@ HRESULT WINAPI IShellLink_ConstructFromFile(IShellFolder * psf, LPCITEMIDLIST pi
         return E_FAIL;
 
     return IShellLink_ConstructFromPath(path, riid, ppv);
-}
\ No newline at end of file
+}