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
1d87649f
Commit
1d87649f
authored
Oct 12, 2007
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Oct 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix returned result code and size in UrlCanonicalizeA.
parent
80192b93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
url.c
dlls/shlwapi/url.c
+15
-15
No files found.
dlls/shlwapi/url.c
View file @
1d87649f
...
...
@@ -268,11 +268,11 @@ HRESULT WINAPI UrlCanonicalizeA(LPCSTR pszUrl, LPSTR pszCanonicalized,
LPDWORD
pcchCanonicalized
,
DWORD
dwFlags
)
{
LPWSTR
base
,
canonical
;
DWORD
ret
,
len
,
len2
;
HRESULT
ret
;
DWORD
len
,
len2
;
TRACE
(
"(%s %p %p 0x%08x) using W version
\n
"
,
debugstr_a
(
pszUrl
),
pszCanonicalized
,
pcchCanonicalized
,
dwFlags
);
TRACE
(
"(%s, %p, %p, 0x%08x) *pcchCanonicalized: %d
\n
"
,
debugstr_a
(
pszUrl
),
pszCanonicalized
,
pcchCanonicalized
,
dwFlags
,
pcchCanonicalized
?
*
pcchCanonicalized
:
-
1
);
if
(
!
pszUrl
||
!
pszCanonicalized
||
!
pcchCanonicalized
)
return
E_INVALIDARG
;
...
...
@@ -286,19 +286,19 @@ HRESULT WINAPI UrlCanonicalizeA(LPCSTR pszUrl, LPSTR pszCanonicalized,
ret
=
UrlCanonicalizeW
(
base
,
canonical
,
&
len
,
dwFlags
);
if
(
ret
!=
S_OK
)
{
HeapFree
(
GetProcessHeap
(),
0
,
base
);
return
ret
;
*
pcchCanonicalized
=
len
*
2
;
HeapFree
(
GetProcessHeap
(),
0
,
base
);
return
ret
;
}
len2
=
WideCharToMultiByte
(
0
,
0
,
canonical
,
len
,
0
,
0
,
0
,
0
);
len2
=
WideCharToMultiByte
(
0
,
0
,
canonical
,
-
1
,
0
,
0
,
0
,
0
);
if
(
len2
>
*
pcchCanonicalized
)
{
*
pcchCanonicalized
=
len
;
HeapFree
(
GetProcessHeap
(),
0
,
base
);
return
E_POINTER
;
*
pcchCanonicalized
=
len2
;
HeapFree
(
GetProcessHeap
(),
0
,
base
);
return
E_POINTER
;
}
WideCharToMultiByte
(
0
,
0
,
canonical
,
len
+
1
,
pszCanonicalized
,
*
pcchCanonicalized
,
0
,
0
);
*
pcchCanonicalized
=
len2
;
WideCharToMultiByte
(
0
,
0
,
canonical
,
-
1
,
pszCanonicalized
,
*
pcchCanonicalized
,
0
,
0
);
*
pcchCanonicalized
=
len
;
HeapFree
(
GetProcessHeap
(),
0
,
base
);
return
S_OK
;
}
...
...
@@ -320,8 +320,8 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
};
TRACE
(
"(%s
%p %p 0x%08x)
\n
"
,
debugstr_w
(
pszUrl
),
pszCanonicalized
,
pcchCanonicalized
,
dwFlags
);
TRACE
(
"(%s
, %p, %p, 0x%08x) *pcchCanonicalized: %d
\n
"
,
debugstr_w
(
pszUrl
),
pszCanonicalized
,
pcchCanonicalized
,
dwFlags
,
pcchCanonicalized
?
*
pcchCanonicalized
:
-
1
);
if
(
!
pszUrl
||
!
pszCanonicalized
||
!
pcchCanonicalized
)
return
E_INVALIDARG
;
...
...
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