shlwapi: Check an argument to UrlEscapeA.
This commit is contained in:
parent
0da7c8f444
commit
32fda2113d
|
@ -479,6 +479,11 @@ static void test_UrlEscape(void)
|
|||
ok(size == 1, "got %d, expected %d\n", size, 1);
|
||||
}
|
||||
|
||||
size = 1;
|
||||
ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, NULL, URL_ESCAPE_SPACES_ONLY);
|
||||
ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG);
|
||||
ok(size == 1, "got %d, expected %d\n", size, 1);
|
||||
|
||||
size = 1;
|
||||
ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY);
|
||||
todo_wine {
|
||||
|
|
|
@ -843,6 +843,9 @@ HRESULT WINAPI UrlEscapeA(
|
|||
HRESULT ret;
|
||||
DWORD lenW = sizeof(bufW)/sizeof(WCHAR), lenA;
|
||||
|
||||
if (!pcchEscaped)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if(!RtlCreateUnicodeStringFromAsciiz(&urlW, pszUrl))
|
||||
return E_INVALIDARG;
|
||||
if((ret = UrlEscapeW(urlW.Buffer, escapedW, &lenW, dwFlags)) == E_POINTER) {
|
||||
|
|
Loading…
Reference in New Issue