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
e1280919
Commit
e1280919
authored
Sep 30, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Oct 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Restructured how the path component is validated in a IUriBuilder.
parent
d8263344
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
17 deletions
+21
-17
uri.c
dlls/urlmon/uri.c
+21
-17
No files found.
dlls/urlmon/uri.c
View file @
e1280919
...
...
@@ -3734,8 +3734,11 @@ static void setup_port(const UriBuilder *builder, parse_data *data, DWORD flags)
static
HRESULT
validate_path
(
const
UriBuilder
*
builder
,
parse_data
*
data
,
DWORD
flags
)
{
const
WCHAR
*
ptr
=
NULL
;
const
WCHAR
*
component
;
const
WCHAR
**
pptr
;
DWORD
expected_len
;
BOOL
check_len
=
TRUE
;
BOOL
valid
=
FALSE
;
if
(
builder
->
path
)
{
ptr
=
builder
->
path
;
...
...
@@ -3744,29 +3747,30 @@ static HRESULT validate_path(const UriBuilder *builder, parse_data *data, DWORD
builder
->
uri
&&
builder
->
uri
->
path_start
>
-
1
)
{
ptr
=
builder
->
uri
->
canon_uri
+
builder
->
uri
->
path_start
;
expected_len
=
builder
->
uri
->
path_len
;
}
else
{
static
const
WCHAR
nullW
[]
=
{
0
};
ptr
=
nullW
;
check_len
=
FALSE
;
}
if
(
ptr
)
{
BOOL
valid
=
FALSE
;
const
WCHAR
*
component
=
ptr
;
pptr
=
&
ptr
;
/* How the path is validated depends on what type of
* URI it is.
*/
valid
=
data
->
is_opaque
?
parse_path_opaque
(
pptr
,
data
,
flags
)
:
parse_path_hierarchical
(
pptr
,
data
,
flags
);
component
=
ptr
;
pptr
=
&
ptr
;
if
(
!
valid
||
expected_len
!=
data
->
path_len
)
{
TRACE
(
"(%p %p %x): Invalid path componet %s.
\n
"
,
builder
,
data
,
flags
,
debugstr_wn
(
component
,
expected_len
));
return
INET_E_INVALID_URL
;
}
/* How the path is validated depends on what type of
* URI it is.
*/
valid
=
data
->
is_opaque
?
parse_path_opaque
(
pptr
,
data
,
flags
)
:
parse_path_hierarchical
(
pptr
,
data
,
flags
);
TRACE
(
"(%p %p %x): Valid path component %s len=%d.
\n
"
,
builder
,
data
,
flags
,
debugstr_wn
(
data
->
path
,
data
->
path_len
),
data
->
path_len
);
if
(
!
valid
||
(
check_len
&&
expected_len
!=
data
->
path_len
))
{
TRACE
(
"(%p %p %x): Invalid path componet %s.
\n
"
,
builder
,
data
,
flags
,
debugstr_wn
(
component
,
expected_len
));
return
INET_E_INVALID_URL
;
}
TRACE
(
"(%p %p %x): Valid path component %s len=%d.
\n
"
,
builder
,
data
,
flags
,
debugstr_wn
(
data
->
path
,
data
->
path_len
),
data
->
path_len
);
return
S_OK
;
}
...
...
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