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
e6d93da7
Commit
e6d93da7
authored
Mar 03, 2004
by
Kevin Koltzau
Committed by
Alexandre Julliard
Mar 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent crash with invalid args in a few URL functions.
parent
4a2731a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
url.c
dlls/shlwapi/url.c
+27
-3
No files found.
dlls/shlwapi/url.c
View file @
e6d93da7
...
...
@@ -419,6 +419,9 @@ HRESULT WINAPI UrlCanonicalizeA(LPCSTR pszUrl, LPSTR pszCanonicalized,
debugstr_a
(
pszUrl
),
pszCanonicalized
,
pcchCanonicalized
,
dwFlags
);
if
(
!
pszUrl
||
!
pszCanonicalized
||
!
pcchCanonicalized
)
return
E_INVALIDARG
;
base
=
(
LPWSTR
)
HeapAlloc
(
GetProcessHeap
(),
0
,
(
2
*
INTERNET_MAX_URL_LENGTH
)
*
sizeof
(
WCHAR
));
canonical
=
base
+
INTERNET_MAX_URL_LENGTH
;
...
...
@@ -461,6 +464,9 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
TRACE
(
"(%s %p %p 0x%08lx)
\n
"
,
debugstr_w
(
pszUrl
),
pszCanonicalized
,
pcchCanonicalized
,
dwFlags
);
if
(
!
pszUrl
||
!
pszCanonicalized
||
!
pcchCanonicalized
)
return
E_INVALIDARG
;
nByteLen
=
(
lstrlenW
(
pszUrl
)
+
1
)
*
sizeof
(
WCHAR
);
/* length in bytes */
lpszUrlCpy
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nByteLen
);
...
...
@@ -629,7 +635,10 @@ HRESULT WINAPI UrlCombineA(LPCSTR pszBase, LPCSTR pszRelative,
TRACE
(
"(base %s, Relative %s, Combine size %ld, flags %08lx) using W version
\n
"
,
debugstr_a
(
pszBase
),
debugstr_a
(
pszRelative
),
*
pcchCombined
,
dwFlags
);
pcchCombined
?*
pcchCombined
:
0
,
dwFlags
);
if
(
!
pszBase
||
!
pszRelative
||
!
pszCombined
||
!
pcchCombined
)
return
E_INVALIDARG
;
base
=
(
LPWSTR
)
HeapAlloc
(
GetProcessHeap
(),
0
,
(
3
*
INTERNET_MAX_URL_LENGTH
)
*
sizeof
(
WCHAR
));
...
...
@@ -678,7 +687,10 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
TRACE
(
"(base %s, Relative %s, Combine size %ld, flags %08lx)
\n
"
,
debugstr_w
(
pszBase
),
debugstr_w
(
pszRelative
),
*
pcchCombined
,
dwFlags
);
pcchCombined
?*
pcchCombined
:
0
,
dwFlags
);
if
(
!
pszBase
||
!
pszRelative
||
!
pszCombined
||
!
pcchCombined
)
return
E_INVALIDARG
;
base
.
size
=
24
;
relative
.
size
=
24
;
...
...
@@ -964,7 +976,10 @@ HRESULT WINAPI UrlEscapeA(
INT
len
;
TRACE
(
"(%s %p %lx 0x%08lx)
\n
"
,
debugstr_a
(
pszUrl
),
pszEscaped
,
*
pcchEscaped
,
dwFlags
);
pcchEscaped
?*
pcchEscaped
:
0
,
dwFlags
);
if
(
!
pszUrl
||
!
pszEscaped
||
!
pcchEscaped
)
return
E_INVALIDARG
;
if
(
dwFlags
&
~
(
URL_ESCAPE_SPACES_ONLY
|
URL_ESCAPE_SEGMENT_ONLY
|
...
...
@@ -1039,6 +1054,9 @@ HRESULT WINAPI UrlEscapeW(
TRACE
(
"(%s %p %p 0x%08lx)
\n
"
,
debugstr_w
(
pszUrl
),
pszEscaped
,
pcchEscaped
,
dwFlags
);
if
(
!
pszUrl
||
!
pszEscaped
||
!
pcchEscaped
)
return
E_INVALIDARG
;
if
(
dwFlags
&
~
(
URL_ESCAPE_SPACES_ONLY
|
URL_ESCAPE_SEGMENT_ONLY
|
URL_DONT_ESCAPE_EXTRA_INFO
|
...
...
@@ -1144,6 +1162,9 @@ HRESULT WINAPI UrlUnescapeA(
TRACE
(
"(%s, %p, %p, 0x%08lx)
\n
"
,
debugstr_a
(
pszUrl
),
pszUnescaped
,
pcchUnescaped
,
dwFlags
);
if
(
!
pszUrl
||
!
pszUnescaped
||
!
pcchUnescaped
)
return
E_INVALIDARG
;
if
(
dwFlags
&
URL_UNESCAPE_INPLACE
)
dst
=
pszUrl
;
else
...
...
@@ -1208,6 +1229,9 @@ HRESULT WINAPI UrlUnescapeW(
TRACE
(
"(%s, %p, %p, 0x%08lx)
\n
"
,
debugstr_w
(
pszUrl
),
pszUnescaped
,
pcchUnescaped
,
dwFlags
);
if
(
!
pszUrl
||
!
pszUnescaped
||
!
pcchUnescaped
)
return
E_INVALIDARG
;
if
(
dwFlags
&
URL_UNESCAPE_INPLACE
)
dst
=
pszUrl
;
else
...
...
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