mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 00:23:10 +00:00
[ADVAPI32]
- Roel Messiant: Properly handle STATUS_BUFFER_TOO_SMALL in RegEnumValueW implementation. See issue #2492 for more details. svn path=/trunk/; revision=49028
This commit is contained in:
parent
d584d4e50e
commit
9a781f022b
1 changed files with 2 additions and 2 deletions
|
@ -2928,12 +2928,12 @@ RegEnumValueW(HKEY hKey,
|
||||||
|
|
||||||
status = NtEnumerateValueKey( KeyHandle, index, KeyValueFullInformation,
|
status = NtEnumerateValueKey( KeyHandle, index, KeyValueFullInformation,
|
||||||
buffer, total_size, &total_size );
|
buffer, total_size, &total_size );
|
||||||
if (status && status != STATUS_BUFFER_OVERFLOW) goto done;
|
if (status && (status != STATUS_BUFFER_OVERFLOW) && (status != STATUS_BUFFER_TOO_SMALL)) goto done;
|
||||||
|
|
||||||
if (value || data)
|
if (value || data)
|
||||||
{
|
{
|
||||||
/* retry with a dynamically allocated buffer */
|
/* retry with a dynamically allocated buffer */
|
||||||
while (status == STATUS_BUFFER_OVERFLOW)
|
while ((status == STATUS_BUFFER_OVERFLOW) || (status == STATUS_BUFFER_TOO_SMALL))
|
||||||
{
|
{
|
||||||
if (buf_ptr != buffer) HeapFree( GetProcessHeap(), 0, buf_ptr );
|
if (buf_ptr != buffer) HeapFree( GetProcessHeap(), 0, buf_ptr );
|
||||||
if (!(buf_ptr = HeapAlloc( GetProcessHeap(), 0, total_size )))
|
if (!(buf_ptr = HeapAlloc( GetProcessHeap(), 0, total_size )))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue