Author: rharabien Date: Wed Jun 8 15:37:15 2011 New Revision: 52149
URL: http://svn.reactos.org/svn/reactos?rev=52149&view=rev Log: [WIN32K] - Revert r51139. Fixes incorrect reading of all REG_MULTI_SZ values See issue #6295 for more details.
Modified: trunk/reactos/subsystems/win32/win32k/misc/registry.c
Modified: trunk/reactos/subsystems/win32/win32k/misc/registry.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/mis... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/misc/registry.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/misc/registry.c [iso-8859-1] Wed Jun 8 15:37:15 2011 @@ -84,16 +84,14 @@
cbDataSize = cbInfoSize - FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data);
+ /* Note: STATUS_BUFFER_OVERFLOW is not a success */ if (NT_SUCCESS(Status)) { /* Did we get the right type */ if (pInfo->Type == ulType) { - /* Copy the contents to the caller. Make sure strings are null terminated */ - if (ulType == REG_SZ || ulType == REG_MULTI_SZ || ulType == REG_EXPAND_SZ) - RtlStringCbCopyNW((LPWSTR)pvData, *pcbValue, (LPWSTR)pInfo->Data, cbDataSize); - else - RtlCopyMemory(pvData, pInfo->Data, cbDataSize); + /* Copy the contents to the caller */ + RtlCopyMemory(pvData, pInfo->Data, cbDataSize); } else Status = STATUS_OBJECT_TYPE_MISMATCH;