Author: fireball
Date: Thu Oct 7 07:21:08 2010
New Revision: 49028
URL:
http://svn.reactos.org/svn/reactos?rev=49028&view=rev
Log:
[ADVAPI32]
- Roel Messiant: Properly handle STATUS_BUFFER_TOO_SMALL in RegEnumValueW implementation.
See issue #2492 for more details.
Modified:
trunk/reactos/dll/win32/advapi32/reg/reg.c
Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Thu Oct 7 07:21:08 2010
@@ -2928,12 +2928,12 @@
status = NtEnumerateValueKey( KeyHandle, index, KeyValueFullInformation,
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)
{
/* 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 = HeapAlloc( GetProcessHeap(), 0, total_size )))