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
bc2e37ba
Commit
bc2e37ba
authored
Nov 12, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: UrlEscapeA should fail with E_POINTER when querying the buffer size.
parent
5b026479
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
path.c
dlls/shlwapi/tests/path.c
+6
-0
url.c
dlls/shlwapi/url.c
+3
-3
No files found.
dlls/shlwapi/tests/path.c
View file @
bc2e37ba
...
...
@@ -476,7 +476,13 @@ static void test_url_canonicalize(const char *szUrl, DWORD dwFlags, HRESULT dwEx
static
void
test_UrlEscape
(
void
)
{
DWORD
size
;
HRESULT
ret
;
unsigned
int
i
;
ret
=
UrlEscapeA
(
"/woningplan/woonkamer basis.swf"
,
NULL
,
&
size
,
URL_ESCAPE_SPACES_ONLY
);
ok
(
ret
==
E_POINTER
,
"got %x, expected %x
\n
"
,
ret
,
E_POINTER
);
for
(
i
=
0
;
i
<
sizeof
(
TEST_ESCAPE
)
/
sizeof
(
TEST_ESCAPE
[
0
]);
i
++
)
{
test_url_escape
(
TEST_ESCAPE
[
i
].
url
,
TEST_ESCAPE
[
i
].
flags
,
TEST_ESCAPE
[
i
].
expectret
,
TEST_ESCAPE
[
i
].
expecturl
);
...
...
dlls/shlwapi/url.c
View file @
bc2e37ba
...
...
@@ -838,7 +838,7 @@ HRESULT WINAPI UrlEscapeA(
}
if
(
ret
==
S_OK
)
{
RtlUnicodeToMultiByteSize
(
&
lenA
,
escapedW
,
lenW
*
sizeof
(
WCHAR
));
if
(
*
pcchEscaped
>
lenA
)
{
if
(
pszEscaped
&&
*
pcchEscaped
>
lenA
)
{
RtlUnicodeToMultiByteN
(
pszEscaped
,
*
pcchEscaped
-
1
,
&
lenA
,
escapedW
,
lenW
*
sizeof
(
WCHAR
));
pszEscaped
[
lenA
]
=
0
;
*
pcchEscaped
=
lenA
;
...
...
@@ -967,8 +967,8 @@ HRESULT WINAPI UrlEscapeW(
TRACE
(
"(%s %p %p 0x%08x)
\n
"
,
debugstr_w
(
pszUrl
),
pszEscaped
,
pcchEscaped
,
dwFlags
);
if
(
!
pszUrl
||
!
p
szEscaped
||
!
p
cchEscaped
)
return
E_INVALIDARG
;
if
(
!
pszUrl
||
!
pcchEscaped
)
return
E_INVALIDARG
;
if
(
dwFlags
&
~
(
URL_ESCAPE_SPACES_ONLY
|
URL_ESCAPE_SEGMENT_ONLY
|
...
...
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