[PATCH] shdocvw: fixed buffersize to GetPrivateProfileStringW

Marcus Meissner marcus at jet.franken.de
Sun Nov 16 03:32:37 CST 2008


Hi,

My static checker spotted the missing *sizeof(WCHAR) here.
(Introduced last week.)

Ciao, Marcus
---
 dlls/shdocvw/intshcut.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/shdocvw/intshcut.c b/dlls/shdocvw/intshcut.c
index 01da03e..fd5e5bf 100644
--- a/dlls/shdocvw/intshcut.c
+++ b/dlls/shdocvw/intshcut.c
@@ -329,7 +329,7 @@ static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileNam
     {
         DWORD len = 128;
         DWORD r;
-        WCHAR *url = CoTaskMemAlloc(len);
+        WCHAR *url = CoTaskMemAlloc(len*sizeof(WCHAR));
         if (url != NULL)
         {
             r = GetPrivateProfileStringW(str_header, str_URL, NULL, url, len, pszFileName);
-- 
1.5.6



More information about the wine-patches mailing list