Jacek Caban : urlmon: Fixed Valgrind warnings.

Alexandre Julliard julliard at winehq.org
Mon Feb 14 10:02:06 CST 2011


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sat Feb 12 18:58:09 2011 +0100

urlmon: Fixed Valgrind warnings.

---

 dlls/urlmon/tests/sec_mgr.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/urlmon/tests/sec_mgr.c b/dlls/urlmon/tests/sec_mgr.c
index 72b6e8a..b88b37a 100644
--- a/dlls/urlmon/tests/sec_mgr.c
+++ b/dlls/urlmon/tests/sec_mgr.c
@@ -792,6 +792,10 @@ static void test_InternetGetSecurityUrl(void)
     CHECK_CALLED(ParseUrl_SECURITY_URL_input2);
     CHECK_CALLED(ParseUrl_SECURITY_URL_expected);
     CHECK_CALLED(ParseUrl_SECURITY_DOMAIN_expected);
+
+    ok(!lstrcmpW(security_expectedW, sec), "Expected %s but got %s\n",
+       wine_dbgstr_w(security_expectedW), wine_dbgstr_w(sec));
+    CoTaskMemFree(sec);
 }
 
 static HRESULT WINAPI InternetProtocolInfo_QueryInterface(IInternetProtocolInfo *iface,
@@ -872,7 +876,7 @@ static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface
     *pcchResult = lstrlenW(ret)+1;
     if(*pcchResult > cchResult)
         return S_FALSE;
-    memcpy(pwzResult, ret, (*pcchResult+1)*sizeof(WCHAR));
+    memcpy(pwzResult, ret, (*pcchResult)*sizeof(WCHAR));
     return S_OK;
 }
 




More information about the wine-cvs mailing list