Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
43bff70a
Commit
43bff70a
authored
Jan 09, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Jan 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Check more arguments to UrlEscapeA.
parent
32fda211
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
11 deletions
+5
-11
url.c
dlls/shlwapi/tests/url.c
+3
-9
url.c
dlls/shlwapi/url.c
+2
-2
No files found.
dlls/shlwapi/tests/url.c
View file @
43bff70a
...
...
@@ -461,23 +461,17 @@ static void test_UrlEscape(void)
ret
=
UrlEscapeA
(
"/woningplan/woonkamer basis.swf"
,
NULL
,
&
size
,
URL_ESCAPE_SPACES_ONLY
);
ok
(
ret
==
E_INVALIDARG
,
"got %x, expected %x
\n
"
,
ret
,
E_INVALIDARG
);
todo_wine
{
ok
(
size
==
0
,
"got %d, expected %d
\n
"
,
size
,
0
);
}
ok
(
size
==
0
,
"got %d, expected %d
\n
"
,
size
,
0
);
size
=
0
;
ret
=
UrlEscapeA
(
"/woningplan/woonkamer basis.swf"
,
empty_string
,
&
size
,
URL_ESCAPE_SPACES_ONLY
);
ok
(
ret
==
E_INVALIDARG
,
"got %x, expected %x
\n
"
,
ret
,
E_INVALIDARG
);
todo_wine
{
ok
(
size
==
0
,
"got %d, expected %d
\n
"
,
size
,
0
);
}
ok
(
size
==
0
,
"got %d, expected %d
\n
"
,
size
,
0
);
size
=
1
;
ret
=
UrlEscapeA
(
"/woningplan/woonkamer basis.swf"
,
NULL
,
&
size
,
URL_ESCAPE_SPACES_ONLY
);
ok
(
ret
==
E_INVALIDARG
,
"got %x, expected %x
\n
"
,
ret
,
E_INVALIDARG
);
todo_wine
{
ok
(
size
==
1
,
"got %d, expected %d
\n
"
,
size
,
1
);
}
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
);
...
...
dlls/shlwapi/url.c
View file @
43bff70a
...
...
@@ -843,7 +843,7 @@ HRESULT WINAPI UrlEscapeA(
HRESULT
ret
;
DWORD
lenW
=
sizeof
(
bufW
)
/
sizeof
(
WCHAR
),
lenA
;
if
(
!
pcchEscaped
)
if
(
!
p
szEscaped
||
!
pcchEscaped
||
!*
p
cchEscaped
)
return
E_INVALIDARG
;
if
(
!
RtlCreateUnicodeStringFromAsciiz
(
&
urlW
,
pszUrl
))
...
...
@@ -854,7 +854,7 @@ HRESULT WINAPI UrlEscapeA(
}
if
(
ret
==
S_OK
)
{
RtlUnicodeToMultiByteSize
(
&
lenA
,
escapedW
,
lenW
*
sizeof
(
WCHAR
));
if
(
pszEscaped
&&
*
pcchEscaped
>
lenA
)
{
if
(
*
pcchEscaped
>
lenA
)
{
RtlUnicodeToMultiByteN
(
pszEscaped
,
*
pcchEscaped
-
1
,
&
lenA
,
escapedW
,
lenW
*
sizeof
(
WCHAR
));
pszEscaped
[
lenA
]
=
0
;
*
pcchEscaped
=
lenA
;
...
...
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