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
645a3147
Commit
645a3147
authored
Jun 22, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Jun 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "advapi32: Fix RegEnumValueW when enumerating long values.".
This reverts commit
443ef6e7
. The tests fail on all versions of Windows.
parent
d940ac24
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
14 deletions
+7
-14
registry.c
dlls/advapi32/registry.c
+7
-1
registry.c
dlls/advapi32/tests/registry.c
+0
-13
No files found.
dlls/advapi32/registry.c
View file @
645a3147
...
...
@@ -1922,12 +1922,16 @@ LSTATUS WINAPI RegEnumValueW( HKEY hkey, DWORD index, LPWSTR value, LPDWORD val_
status
=
NtEnumerateValueKey
(
hkey
,
index
,
KeyValueFullInformation
,
buffer
,
total_size
,
&
total_size
);
if
(
status
&&
status
!=
STATUS_BUFFER_OVERFLOW
)
goto
done
;
if
(
value
||
data
)
{
/* retry with a dynamically allocated buffer */
while
(
status
==
STATUS_BUFFER_OVERFLOW
)
{
if
(
buf_ptr
!=
buffer
)
heap_free
(
buf_ptr
);
if
(
!
(
buf_ptr
=
heap_alloc
(
total_size
)))
return
ERROR_NOT_ENOUGH_MEMORY
;
if
(
!
(
buf_ptr
=
heap_alloc
(
total_size
)))
return
ERROR_NOT_ENOUGH_MEMORY
;
info
=
(
KEY_VALUE_FULL_INFORMATION
*
)
buf_ptr
;
status
=
NtEnumerateValueKey
(
hkey
,
index
,
KeyValueFullInformation
,
buf_ptr
,
total_size
,
&
total_size
);
...
...
@@ -1963,6 +1967,8 @@ LSTATUS WINAPI RegEnumValueW( HKEY hkey, DWORD index, LPWSTR value, LPDWORD val_
if
(
ptr
>
(
WCHAR
*
)
data
&&
ptr
[
-
1
])
*
ptr
=
0
;
}
}
}
else
status
=
STATUS_SUCCESS
;
overflow:
if
(
type
)
*
type
=
info
->
Type
;
...
...
dlls/advapi32/tests/registry.c
View file @
645a3147
...
...
@@ -522,8 +522,6 @@ static void test_enum_value(void)
static
const
WCHAR
foobarW
[]
=
{
'f'
,
'o'
,
'o'
,
'b'
,
'a'
,
'r'
,
0
};
static
const
WCHAR
testW
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
xxxW
[]
=
{
'x'
,
'x'
,
'x'
,
'x'
,
'x'
,
'x'
,
'x'
,
'x'
,
0
};
WCHAR
longW
[
128
];
int
i
;
/* create the working key for new 'Test' value */
res
=
RegCreateKeyA
(
hkey_main
,
"TestKey"
,
&
test_key
);
...
...
@@ -712,17 +710,6 @@ static void test_enum_value(void)
ok
(
!
memcmp
(
valueW
,
testW
,
sizeof
(
testW
)
),
"value is not 'Test'
\n
"
);
ok
(
!
memcmp
(
dataW
,
foobarW
,
sizeof
(
foobarW
)
),
"data is not 'foobar'
\n
"
);
/* tests the overflow case for the fixed "char buffer[]" in RegEnumValueW */
for
(
i
=
0
;
i
<
sizeof
(
longW
)
/
sizeof
(
WCHAR
);
i
++
)
longW
[
i
]
=
'x'
;
longW
[
i
-
1
]
=
0
;
res
=
RegSetValueExW
(
test_key
,
testW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
longW
,
sizeof
(
longW
)
);
ok
(
res
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %d
\n
"
,
res
);
data_count
=
20
;
type
=
1234
;
res
=
RegEnumValueW
(
test_key
,
0
,
NULL
,
NULL
,
NULL
,
&
type
,
NULL
,
&
data_count
);
ok
(
res
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
data_count
==
sizeof
(
longW
),
"data_count set to %d
\n
"
,
data_count
);
cleanup:
RegDeleteKeyA
(
test_key
,
""
);
RegCloseKey
(
test_key
);
...
...
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