1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-01 07:14:31 +00:00

ntdll: Fix type and size of expanded strings in RtlQueryRegistryValues.

This commit is contained in:
Alex Henrie 2024-06-20 23:16:19 -06:00 committed by Alexandre Julliard
parent 7dad7e87a9
commit c77a217d34
2 changed files with 2 additions and 3 deletions

View File

@ -376,8 +376,7 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
dst.MaximumLength = res;
dst.Buffer = RtlAllocateHeap(GetProcessHeap(), 0, res * sizeof(WCHAR));
RtlExpandEnvironmentStrings_U(pEnvironment, &src, &dst, &res);
status = pQuery->QueryRoutine(pQuery->Name, pInfo->Type, dst.Buffer,
dst.Length, pContext, pQuery->EntryContext);
status = pQuery->QueryRoutine(pQuery->Name, REG_SZ, dst.Buffer, res, pContext, pQuery->EntryContext);
RtlFreeHeap(GetProcessHeap(), 0, dst.Buffer);
}
else /* REG_MULTI_SZ */

View File

@ -2863,7 +2863,7 @@ static struct query_reg_values_test query_reg_values_tests[] =
/* DELETE deletes the value after reading it */
{
{{ query_routine, RTL_QUERY_REGISTRY_DELETE, (WCHAR*)L"WindowsDrive" }},
STATUS_SUCCESS, 1, WINE_TODO_TYPE | WINE_TODO_SIZE, REG_SZ, L"C:"
STATUS_SUCCESS, 1, 0, REG_SZ, L"C:"
},
{
{{ query_routine, 0, (WCHAR*)L"I don't exist", NULL, REG_SZ, (WCHAR*)L"Some default" }},