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
65717d67
Commit
65717d67
authored
Apr 23, 2018
by
Hugh McMaster
Committed by
Alexandre Julliard
Apr 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Null terminate hex-formatted REG_SZ data if necessary.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
829c0ced
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
import.c
programs/reg/import.c
+2
-1
reg.c
programs/reg/tests/reg.c
+1
-1
No files found.
programs/reg/import.c
View file @
65717d67
...
@@ -409,7 +409,8 @@ static void free_parser_data(struct parser *parser)
...
@@ -409,7 +409,8 @@ static void free_parser_data(struct parser *parser)
static
void
prepare_hex_string_data
(
struct
parser
*
parser
)
static
void
prepare_hex_string_data
(
struct
parser
*
parser
)
{
{
if
(
parser
->
data_type
==
REG_EXPAND_SZ
||
parser
->
data_type
==
REG_MULTI_SZ
)
if
(
parser
->
data_type
==
REG_EXPAND_SZ
||
parser
->
data_type
==
REG_MULTI_SZ
||
parser
->
data_type
==
REG_SZ
)
{
{
if
(
parser
->
is_unicode
)
if
(
parser
->
is_unicode
)
{
{
...
...
programs/reg/tests/reg.c
View file @
65717d67
...
@@ -4668,7 +4668,7 @@ static void test_export(void)
...
@@ -4668,7 +4668,7 @@ static void test_export(void)
err
=
RegQueryValueExA
(
hkey
,
"Wine4d"
,
NULL
,
&
type
,
(
BYTE
*
)
&
buffer
,
&
size
);
err
=
RegQueryValueExA
(
hkey
,
"Wine4d"
,
NULL
,
&
type
,
(
BYTE
*
)
&
buffer
,
&
size
);
ok
(
err
==
ERROR_SUCCESS
,
"RegQueryValueExA failed: %d
\n
"
,
err
);
ok
(
err
==
ERROR_SUCCESS
,
"RegQueryValueExA failed: %d
\n
"
,
err
);
ok
(
type
==
REG_SZ
,
"got wrong type %u, expected %u
\n
"
,
type
,
REG_SZ
);
ok
(
type
==
REG_SZ
,
"got wrong type %u, expected %u
\n
"
,
type
,
REG_SZ
);
todo_wine
ok
(
size
==
5
||
broken
(
size
==
4
)
/* WinXP */
,
"got wrong size %u, expected 5
\n
"
,
size
);
ok
(
size
==
5
||
broken
(
size
==
4
)
/* WinXP */
,
"got wrong size %u, expected 5
\n
"
,
size
);
ok
(
memcmp
(
buffer
,
"
\0
abc"
,
size
)
==
0
,
"got wrong data
\n
"
);
ok
(
memcmp
(
buffer
,
"
\0
abc"
,
size
)
==
0
,
"got wrong data
\n
"
);
dword
=
0x100
;
dword
=
0x100
;
verify_reg
(
hkey
,
"Wine4e"
,
REG_DWORD
,
&
dword
,
sizeof
(
dword
),
0
);
verify_reg
(
hkey
,
"Wine4e"
,
REG_DWORD
,
&
dword
,
sizeof
(
dword
),
0
);
...
...
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