Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7c991833
Commit
7c991833
authored
Feb 16, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix parameter check for UrlUnescapeA.
NULL pszUnescaped is okay if URL_UNESCAPE_INPLACE is set. Add a corresponding test for UrlUnescape{A,W}.
parent
8e7f30ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
path.c
dlls/shlwapi/tests/path.c
+8
-0
url.c
dlls/shlwapi/url.c
+1
-1
No files found.
dlls/shlwapi/tests/path.c
View file @
7c991833
...
...
@@ -585,6 +585,9 @@ static void test_UrlUnescape(void)
WCHAR
*
urlW
,
*
expected_urlW
;
DWORD
dwEscaped
;
size_t
i
;
static
char
inplace
[]
=
"file:///C:/Program%20Files"
;
static
WCHAR
inplaceW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
'/'
,
'C'
,
':'
,
'/'
,
'P'
,
'r'
,
'o'
,
'g'
,
'r'
,
'a'
,
'm'
,
'%'
,
'2'
,
'0'
,
'F'
,
'i'
,
'l'
,
'e'
,
's'
,
0
};
for
(
i
=
0
;
i
<
sizeof
(
TEST_URL_UNESCAPE
)
/
sizeof
(
TEST_URL_UNESCAPE
[
0
]);
i
++
)
{
dwEscaped
=
INTERNET_MAX_URL_LENGTH
;
...
...
@@ -601,6 +604,11 @@ static void test_UrlUnescape(void)
FreeWideString
(
expected_urlW
);
}
dwEscaped
=
sizeof
(
inplace
);
ok
(
UrlUnescapeA
(
inplace
,
NULL
,
&
dwEscaped
,
URL_UNESCAPE_INPLACE
)
==
S_OK
,
"UrlUnescapeA failed unexpectedly
\n
"
);
dwEscaped
=
sizeof
(
inplaceW
);
ok
(
UrlUnescapeW
(
inplaceW
,
NULL
,
&
dwEscaped
,
URL_UNESCAPE_INPLACE
)
==
S_OK
,
"UrlUnescapeW failed unexpectedly
\n
"
);
}
static
void
test_PathSearchAndQualify
(
void
)
...
...
dlls/shlwapi/url.c
View file @
7c991833
...
...
@@ -1117,7 +1117,7 @@ HRESULT WINAPI UrlUnescapeA(
TRACE
(
"(%s, %p, %p, 0x%08lx)
\n
"
,
debugstr_a
(
pszUrl
),
pszUnescaped
,
pcchUnescaped
,
dwFlags
);
if
(
!
pszUrl
||
!
pszUnescaped
||
!
pcchUnescaped
)
if
(
!
pszUrl
||
(
!
pszUnescaped
&&
!
(
dwFlags
&
URL_UNESCAPE_INPLACE
))
||
!
pcchUnescaped
)
return
E_INVALIDARG
;
if
(
dwFlags
&
URL_UNESCAPE_INPLACE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment