Paul Vriens : url: Fixed wrong argument (Coverity).
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Sep 20 05:33:55 CDT 2006
Module: wine
Branch: master
Commit: 2ade49bf086a4cbc51583c2d94c61ac794bb9319
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=2ade49bf086a4cbc51583c2d94c61ac794bb9319
Author: Paul Vriens <Paul.Vriens at xs4all.nl>
Date: Sun Sep 17 15:56:05 2006 +0200
url: Fixed wrong argument (Coverity).
---
dlls/shlwapi/tests/path.c | 6 ++++++
dlls/url/url_main.c | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c
index f700038..9bc534a 100644
--- a/dlls/shlwapi/tests/path.c
+++ b/dlls/shlwapi/tests/path.c
@@ -738,6 +738,12 @@ static void test_PathCreateFromUrl(void)
DWORD len, ret;
WCHAR ret_pathW[INTERNET_MAX_URL_LENGTH];
WCHAR *pathW, *urlW;
+ static const char url[] = "http://www.winehq.org";
+
+ /* Check ret_path = NULL */
+ len = sizeof(url);
+ ret = PathCreateFromUrlA(url, NULL, &len, 0);
+ ok ( ret == E_INVALIDARG, "got 0x%08lx expected E_INVALIDARG\n", ret);
for(i = 0; i < sizeof(TEST_PATHFROMURL) / sizeof(TEST_PATHFROMURL[0]); i++) {
len = INTERNET_MAX_URL_LENGTH;
diff --git a/dlls/url/url_main.c b/dlls/url/url_main.c
index eeb4483..0d8b5eb 100644
--- a/dlls/url/url_main.c
+++ b/dlls/url/url_main.c
@@ -66,7 +66,7 @@ BOOL WINAPI InetIsOffline(void)
HRESULT WINAPI FileProtocolHandlerA(HWND hWnd, LPCSTR pszUrl,int nShowCmd)
{
- LPSTR pszPath = NULL;
+ CHAR pszPath[MAX_PATH];
DWORD size = MAX_PATH;
HRESULT createpath = PathCreateFromUrlA(pszUrl,pszPath,&size,0);
More information about the wine-cvs
mailing list