1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-03 08:19:41 +00:00

ntdll: Don't call a null QueryRoutine in RtlQueryRegistryValues.

This commit is contained in:
Alex Henrie 2024-06-11 23:40:15 -06:00 committed by Alexandre Julliard
parent bc097ef81a
commit 2bc3b7f850
2 changed files with 7 additions and 3 deletions

View File

@ -265,7 +265,7 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
memcpy(str->Buffer, pQuery->DefaultData, default_size);
return STATUS_SUCCESS;
}
else
else if (pQuery->QueryRoutine)
{
status = pQuery->QueryRoutine(pQuery->Name, pQuery->DefaultType, pQuery->DefaultData,
pQuery->DefaultLength, pContext, pQuery->EntryContext);
@ -336,7 +336,7 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
break;
}
}
else
else if (pQuery->QueryRoutine)
{
if((pQuery->Flags & RTL_QUERY_REGISTRY_NOEXPAND) ||
(pInfo->Type != REG_EXPAND_SZ && pInfo->Type != REG_MULTI_SZ))

View File

@ -2636,7 +2636,11 @@ static struct query_reg_values_test query_reg_values_tests[] =
/* Name without query routine or DIRECT */
{
{{ NULL, 0, (WCHAR*)L"WindowsDrive" }},
STATUS_SUCCESS, 0, WINE_CRASH
STATUS_SUCCESS, 0
},
{
{{ NULL, 0, (WCHAR*)L"I don't exist", NULL, REG_SZ, (WCHAR*)L"Some default" }},
STATUS_SUCCESS, 0
},
/* The query routine is called for every value in current key */
{