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
fcceb61f
Commit
fcceb61f
authored
Apr 22, 2009
by
Colin Finck
Committed by
Alexandre Julliard
Apr 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Fix the size passed to MultiByteToWideChar.
parent
eafc9caa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
install.c
dlls/mshtml/install.c
+4
-2
No files found.
dlls/mshtml/install.c
View file @
fcceb61f
...
@@ -425,6 +425,7 @@ static LPWSTR get_url(void)
...
@@ -425,6 +425,7 @@ static LPWSTR get_url(void)
HKEY
hkey
;
HKEY
hkey
;
DWORD
res
,
type
;
DWORD
res
,
type
;
DWORD
size
=
INTERNET_MAX_URL_LENGTH
*
sizeof
(
WCHAR
);
DWORD
size
=
INTERNET_MAX_URL_LENGTH
*
sizeof
(
WCHAR
);
DWORD
returned_size
;
LPWSTR
url
;
LPWSTR
url
;
static
const
WCHAR
wszGeckoUrl
[]
=
{
'G'
,
'e'
,
'c'
,
'k'
,
'o'
,
'U'
,
'r'
,
'l'
,
0
};
static
const
WCHAR
wszGeckoUrl
[]
=
{
'G'
,
'e'
,
'c'
,
'k'
,
'o'
,
'U'
,
'r'
,
'l'
,
0
};
...
@@ -437,15 +438,16 @@ static LPWSTR get_url(void)
...
@@ -437,15 +438,16 @@ static LPWSTR get_url(void)
return
NULL
;
return
NULL
;
url
=
heap_alloc
(
size
);
url
=
heap_alloc
(
size
);
returned_size
=
size
;
res
=
RegQueryValueExW
(
hkey
,
wszGeckoUrl
,
NULL
,
&
type
,
(
LPBYTE
)
url
,
&
size
);
res
=
RegQueryValueExW
(
hkey
,
wszGeckoUrl
,
NULL
,
&
type
,
(
LPBYTE
)
url
,
&
returned_
size
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
{
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
{
heap_free
(
url
);
heap_free
(
url
);
return
NULL
;
return
NULL
;
}
}
if
(
size
>
sizeof
(
httpW
)
&&
!
memcmp
(
url
,
httpW
,
sizeof
(
httpW
)))
{
if
(
returned_
size
>
sizeof
(
httpW
)
&&
!
memcmp
(
url
,
httpW
,
sizeof
(
httpW
)))
{
strcatW
(
url
,
v_formatW
);
strcatW
(
url
,
v_formatW
);
MultiByteToWideChar
(
CP_ACP
,
0
,
GECKO_VERSION
,
-
1
,
url
+
strlenW
(
url
),
size
/
sizeof
(
WCHAR
)
-
strlenW
(
url
));
MultiByteToWideChar
(
CP_ACP
,
0
,
GECKO_VERSION
,
-
1
,
url
+
strlenW
(
url
),
size
/
sizeof
(
WCHAR
)
-
strlenW
(
url
));
}
}
...
...
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