Commit 2ade49bf authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

url: Fixed wrong argument (Coverity).

parent 53a48942
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment