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
1f98ede4
Commit
1f98ede4
authored
Dec 14, 2007
by
Aric Stewart
Committed by
Alexandre Julliard
Dec 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptnet: InternetCrackUrlW requires component buffers when used with ICU_DECODE.
parent
ba280fb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
cryptnet_main.c
dlls/cryptnet/cryptnet_main.c
+14
-11
No files found.
dlls/cryptnet/cryptnet_main.c
View file @
1f98ede4
...
...
@@ -476,18 +476,16 @@ static BOOL CRYPT_CrackUrl(LPCWSTR pszURL, URL_COMPONENTSW *components)
memset
(
components
,
0
,
sizeof
(
*
components
));
components
->
dwStructSize
=
sizeof
(
*
components
);
components
->
dwHostNameLength
=
1
;
components
->
dwUrlPathLength
=
1
;
components
->
lpszHostName
=
CryptMemAlloc
(
MAX_PATH
*
sizeof
(
WCHAR
));
components
->
dwHostNameLength
=
MAX_PATH
;
components
->
lpszUrlPath
=
CryptMemAlloc
(
MAX_PATH
*
2
*
sizeof
(
WCHAR
));
components
->
dwUrlPathLength
=
2
*
MAX_PATH
;
ret
=
InternetCrackUrlW
(
pszURL
,
0
,
ICU_DECODE
,
components
);
if
(
ret
)
{
LPWSTR
hostname
=
strndupW
(
components
->
lpszHostName
,
components
->
dwHostNameLength
);
LPWSTR
path
=
strndupW
(
components
->
lpszUrlPath
,
components
->
dwUrlPathLength
);
components
->
lpszHostName
=
hostname
;
components
->
lpszUrlPath
=
path
;
if
((
components
->
dwUrlPathLength
==
2
*
MAX_PATH
-
1
)
||
(
components
->
dwHostNameLength
==
MAX_PATH
-
1
))
FIXME
(
"Buffers are too small
\n
"
);
switch
(
components
->
nScheme
)
{
case
INTERNET_SCHEME_FTP
:
...
...
@@ -873,12 +871,16 @@ static BOOL WINAPI File_RetrieveEncodedObjectW(LPCWSTR pszURL,
*
ppfnFreeObject
=
CRYPT_FreeBlob
;
*
ppvFreeContext
=
NULL
;
components
.
dwUrlPathLength
=
1
;
components
.
lpszUrlPath
=
CryptMemAlloc
(
MAX_PATH
*
2
*
sizeof
(
WCHAR
));
components
.
dwUrlPathLength
=
2
*
MAX_PATH
;
ret
=
InternetCrackUrlW
(
pszURL
,
0
,
ICU_DECODE
,
&
components
);
if
(
ret
)
{
LPWSTR
path
;
if
(
components
.
dwUrlPathLength
==
2
*
MAX_PATH
-
1
)
FIXME
(
"Buffers are too small
\n
"
);
/* 3 == lstrlenW(L"c:") + 1 */
path
=
CryptMemAlloc
((
components
.
dwUrlPathLength
+
3
)
*
sizeof
(
WCHAR
));
if
(
path
)
...
...
@@ -932,6 +934,7 @@ static BOOL WINAPI File_RetrieveEncodedObjectW(LPCWSTR pszURL,
CryptMemFree
(
path
);
}
}
CryptMemFree
(
components
.
lpszUrlPath
);
return
ret
;
}
...
...
@@ -952,7 +955,7 @@ static BOOL CRYPT_GetRetrieveFunction(LPCWSTR pszURL,
*
pFunc
=
NULL
;
*
phFunc
=
0
;
components
.
dwSchemeLength
=
1
;
ret
=
InternetCrackUrlW
(
pszURL
,
0
,
ICU_DECODE
,
&
components
);
ret
=
InternetCrackUrlW
(
pszURL
,
0
,
0
,
&
components
);
if
(
ret
)
{
/* Microsoft always uses CryptInitOIDFunctionSet/
...
...
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