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
e958a570
Commit
e958a570
authored
Jan 06, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix the Data and Name returned by NtQueryValueKey for KeyValueFullInformation.
parent
edab3a6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
reg.c
dlls/ntdll/reg.c
+9
-1
reg.c
dlls/ntdll/tests/reg.c
+0
-3
No files found.
dlls/ntdll/reg.c
View file @
e958a570
...
@@ -485,9 +485,17 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name,
...
@@ -485,9 +485,17 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name,
data_ptr
=
NULL
;
data_ptr
=
NULL
;
break
;
break
;
case
KeyValueFullInformation
:
case
KeyValueFullInformation
:
data_ptr
=
(
UCHAR
*
)((
KEY_VALUE_FULL_INFORMATION
*
)
info
)
->
Name
;
{
KEY_VALUE_FULL_INFORMATION
*
full_info
=
info
;
if
(
FIELD_OFFSET
(
KEY_VALUE_FULL_INFORMATION
,
Name
)
<
length
)
{
memcpy
(
full_info
->
Name
,
name
->
Buffer
,
min
(
length
-
FIELD_OFFSET
(
KEY_VALUE_FULL_INFORMATION
,
Name
),
name
->
Length
));
}
data_ptr
=
(
UCHAR
*
)
full_info
->
Name
+
name
->
Length
;
fixed_size
=
(
char
*
)
data_ptr
-
(
char
*
)
info
;
fixed_size
=
(
char
*
)
data_ptr
-
(
char
*
)
info
;
break
;
break
;
}
case
KeyValuePartialInformation
:
case
KeyValuePartialInformation
:
data_ptr
=
((
KEY_VALUE_PARTIAL_INFORMATION
*
)
info
)
->
Data
;
data_ptr
=
((
KEY_VALUE_PARTIAL_INFORMATION
*
)
info
)
->
Data
;
fixed_size
=
(
char
*
)
data_ptr
-
(
char
*
)
info
;
fixed_size
=
(
char
*
)
data_ptr
-
(
char
*
)
info
;
...
...
dlls/ntdll/tests/reg.c
View file @
e958a570
...
@@ -501,7 +501,6 @@ static void test_NtQueryValueKey(void)
...
@@ -501,7 +501,6 @@ static void test_NtQueryValueKey(void)
ok
(
full_info
->
Type
==
REG_DWORD
,
"NtQueryValueKey returned wrong Type %d
\n
"
,
full_info
->
Type
);
ok
(
full_info
->
Type
==
REG_DWORD
,
"NtQueryValueKey returned wrong Type %d
\n
"
,
full_info
->
Type
);
ok
(
full_info
->
DataLength
==
4
,
"NtQueryValueKey returned wrong DataLength %d
\n
"
,
full_info
->
DataLength
);
ok
(
full_info
->
DataLength
==
4
,
"NtQueryValueKey returned wrong DataLength %d
\n
"
,
full_info
->
DataLength
);
ok
(
full_info
->
NameLength
==
20
,
"NtQueryValueKey returned wrong NameLength %d
\n
"
,
full_info
->
NameLength
);
ok
(
full_info
->
NameLength
==
20
,
"NtQueryValueKey returned wrong NameLength %d
\n
"
,
full_info
->
NameLength
);
todo_wine
ok
(
len
==
FIELD_OFFSET
(
KEY_VALUE_FULL_INFORMATION
,
Name
[
0
])
+
full_info
->
DataLength
+
full_info
->
NameLength
,
ok
(
len
==
FIELD_OFFSET
(
KEY_VALUE_FULL_INFORMATION
,
Name
[
0
])
+
full_info
->
DataLength
+
full_info
->
NameLength
,
"NtQueryValueKey returned wrong len %d
\n
"
,
len
);
"NtQueryValueKey returned wrong len %d
\n
"
,
len
);
len
=
FIELD_OFFSET
(
KEY_VALUE_FULL_INFORMATION
,
Name
[
0
])
+
full_info
->
DataLength
+
full_info
->
NameLength
;
len
=
FIELD_OFFSET
(
KEY_VALUE_FULL_INFORMATION
,
Name
[
0
])
+
full_info
->
DataLength
+
full_info
->
NameLength
;
...
@@ -513,9 +512,7 @@ static void test_NtQueryValueKey(void)
...
@@ -513,9 +512,7 @@ static void test_NtQueryValueKey(void)
ok
(
full_info
->
Type
==
REG_DWORD
,
"NtQueryValueKey returned wrong Type %d
\n
"
,
full_info
->
Type
);
ok
(
full_info
->
Type
==
REG_DWORD
,
"NtQueryValueKey returned wrong Type %d
\n
"
,
full_info
->
Type
);
ok
(
full_info
->
DataLength
==
4
,
"NtQueryValueKey returned wrong DataLength %d
\n
"
,
full_info
->
DataLength
);
ok
(
full_info
->
DataLength
==
4
,
"NtQueryValueKey returned wrong DataLength %d
\n
"
,
full_info
->
DataLength
);
ok
(
full_info
->
NameLength
==
20
,
"NtQueryValueKey returned wrong NameLength %d
\n
"
,
full_info
->
NameLength
);
ok
(
full_info
->
NameLength
==
20
,
"NtQueryValueKey returned wrong NameLength %d
\n
"
,
full_info
->
NameLength
);
todo_wine
ok
(
!
memcmp
(
full_info
->
Name
,
ValName
.
Buffer
,
ValName
.
Length
),
"incorrect Name returned
\n
"
);
ok
(
!
memcmp
(
full_info
->
Name
,
ValName
.
Buffer
,
ValName
.
Length
),
"incorrect Name returned
\n
"
);
todo_wine
ok
(
*
(
DWORD
*
)((
char
*
)
full_info
+
full_info
->
DataOffset
)
==
711
,
"incorrect Data returned: 0x%x
\n
"
,
ok
(
*
(
DWORD
*
)((
char
*
)
full_info
+
full_info
->
DataOffset
)
==
711
,
"incorrect Data returned: 0x%x
\n
"
,
*
(
DWORD
*
)((
char
*
)
full_info
+
full_info
->
DataOffset
));
*
(
DWORD
*
)((
char
*
)
full_info
+
full_info
->
DataOffset
));
HeapFree
(
GetProcessHeap
(),
0
,
full_info
);
HeapFree
(
GetProcessHeap
(),
0
,
full_info
);
...
...
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