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
7e2228f1
Commit
7e2228f1
authored
Mar 08, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Fixed registry test that failed because of a buffer overflow.
parent
bf6d0f22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
registry.c
dlls/advapi32/tests/registry.c
+4
-8
No files found.
dlls/advapi32/tests/registry.c
View file @
7e2228f1
...
...
@@ -754,7 +754,6 @@ static void test_reg_query_value(void)
LONG
size
,
ret
;
static
const
WCHAR
expected
[]
=
{
'd'
,
'a'
,
't'
,
'a'
,
0
};
static
const
WCHAR
set
[]
=
{
'd'
,
'a'
,
't'
,
'a'
};
ret
=
RegCreateKeyA
(
hkey_main
,
"subkey"
,
&
subkey
);
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
ret
);
...
...
@@ -845,19 +844,16 @@ static void test_reg_query_value(void)
ok
(
size
==
sizeof
(
expected
),
"Got wrong size: %d
\n
"
,
size
);
/* unicode - set the value without a NULL terminator */
ret
=
RegSetValueW
(
subkey
,
NULL
,
REG_SZ
,
set
,
sizeof
(
set
));
ret
=
RegSetValueW
(
subkey
,
NULL
,
REG_SZ
,
expected
,
sizeof
(
expected
)
-
sizeof
(
WCHAR
));
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
ret
);
/* unicode - read the unterminated value, value is terminated for us */
memset
(
valW
,
'a'
,
sizeof
(
valW
));
size
=
sizeof
(
valW
);
ret
=
RegQueryValueW
(
subkey
,
NULL
,
valW
,
&
size
);
todo_wine
{
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
ret
);
ok
(
!
lstrcmpW
(
valW
,
expected
),
"Got wrong value
\n
"
);
ok
(
size
==
sizeof
(
expected
),
"Got wrong size: %d
\n
"
,
size
);
}
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
ret
);
ok
(
!
lstrcmpW
(
valW
,
expected
),
"Got wrong value
\n
"
);
ok
(
size
==
sizeof
(
expected
),
"Got wrong size: %d
\n
"
,
size
);
RegDeleteKeyA
(
subkey
,
""
);
}
...
...
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