Alexander Nicolaysen Sørnes : shdocvw: Fix a buffer overflow in InternetShortcut's IPersistFile::Load.

Alexandre Julliard julliard at winehq.org
Wed Jul 21 10:55:00 CDT 2010


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

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Wed Jul 14 15:15:47 2010 +0200

shdocvw: Fix a buffer overflow in InternetShortcut's IPersistFile::Load.

---

 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 32dab6d..8c17873 100644
--- a/dlls/shdocvw/intshcut.c
+++ b/dlls/shdocvw/intshcut.c
@@ -361,7 +361,7 @@ static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileNam
             {
                 CoTaskMemFree(url);
                 len *= 2;
-                url = CoTaskMemAlloc(len);
+                url = CoTaskMemAlloc(len*sizeof(WCHAR));
                 if (url == NULL)
                     break;
                 r = GetPrivateProfileStringW(str_header, str_URL, NULL, url, len, pszFileName);




More information about the wine-cvs mailing list