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
efd98cae
Commit
efd98cae
authored
Oct 20, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Oct 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Pass size in bytes to RegQueryValueExW().
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2adf4376
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
builtins.c
programs/cmd/builtins.c
+3
-2
wcmdmain.c
programs/cmd/wcmdmain.c
+2
-2
No files found.
programs/cmd/builtins.c
View file @
efd98cae
...
...
@@ -4763,7 +4763,7 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) {
WCHAR
*
newValue
;
LONG
rc
=
ERROR_SUCCESS
;
WCHAR
keyValue
[
MAXSTRING
];
DWORD
valueLen
=
MAXSTRING
;
DWORD
valueLen
;
HKEY
readKey
;
/* See if parameter includes '=' */
...
...
@@ -4803,7 +4803,7 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) {
if
(
RegOpenKeyExW
(
key
,
subkey
,
0
,
accessOptions
,
&
readKey
)
==
ERROR_SUCCESS
)
{
valueLen
=
ARRAY_SIZE
(
keyValue
);
valueLen
=
sizeof
(
keyValue
);
rc
=
RegQueryValueExW
(
readKey
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
keyValue
,
&
valueLen
);
WCMD_output_asis
(
keyName
);
WCMD_output_asis
(
L"="
);
...
...
@@ -4836,6 +4836,7 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) {
if
(
RegOpenKeyExW
(
key
,
subkey
,
0
,
accessOptions
,
&
readKey
)
==
ERROR_SUCCESS
)
{
valueLen
=
sizeof
(
keyValue
);
rc
=
RegQueryValueExW
(
readKey
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
keyValue
,
&
valueLen
);
WCMD_output_asis
(
args
);
WCMD_output_asis
(
L"="
);
...
...
programs/cmd/wcmdmain.c
View file @
efd98cae
...
...
@@ -2700,7 +2700,7 @@ int __cdecl wmain (int argc, WCHAR *argvW[])
size
=
sizeof
(
DWORD
);
RegQueryValueExW
(
key
,
L"DefaultColor"
,
NULL
,
NULL
,
(
BYTE
*
)
&
value
,
&
size
);
}
else
if
(
type
==
REG_SZ
)
{
size
=
ARRAY_SIZE
(
strvalue
);
size
=
sizeof
(
strvalue
);
RegQueryValueExW
(
key
,
L"DefaultColor"
,
NULL
,
NULL
,
(
BYTE
*
)
strvalue
,
&
size
);
value
=
wcstoul
(
strvalue
,
NULL
,
10
);
}
...
...
@@ -2719,7 +2719,7 @@ int __cdecl wmain (int argc, WCHAR *argvW[])
size
=
sizeof
(
DWORD
);
RegQueryValueExW
(
key
,
L"DefaultColor"
,
NULL
,
NULL
,
(
BYTE
*
)
&
value
,
&
size
);
}
else
if
(
type
==
REG_SZ
)
{
size
=
ARRAY_SIZE
(
strvalue
);
size
=
sizeof
(
strvalue
);
RegQueryValueExW
(
key
,
L"DefaultColor"
,
NULL
,
NULL
,
(
BYTE
*
)
strvalue
,
&
size
);
value
=
wcstoul
(
strvalue
,
NULL
,
10
);
}
...
...
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