mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 17:04:06 +00:00
ntdll: Don't call a null QueryRoutine in RtlQueryRegistryValues.
This commit is contained in:
parent
bc097ef81a
commit
2bc3b7f850
|
@ -265,7 +265,7 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
|
||||||
memcpy(str->Buffer, pQuery->DefaultData, default_size);
|
memcpy(str->Buffer, pQuery->DefaultData, default_size);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else if (pQuery->QueryRoutine)
|
||||||
{
|
{
|
||||||
status = pQuery->QueryRoutine(pQuery->Name, pQuery->DefaultType, pQuery->DefaultData,
|
status = pQuery->QueryRoutine(pQuery->Name, pQuery->DefaultType, pQuery->DefaultData,
|
||||||
pQuery->DefaultLength, pContext, pQuery->EntryContext);
|
pQuery->DefaultLength, pContext, pQuery->EntryContext);
|
||||||
|
@ -336,7 +336,7 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (pQuery->QueryRoutine)
|
||||||
{
|
{
|
||||||
if((pQuery->Flags & RTL_QUERY_REGISTRY_NOEXPAND) ||
|
if((pQuery->Flags & RTL_QUERY_REGISTRY_NOEXPAND) ||
|
||||||
(pInfo->Type != REG_EXPAND_SZ && pInfo->Type != REG_MULTI_SZ))
|
(pInfo->Type != REG_EXPAND_SZ && pInfo->Type != REG_MULTI_SZ))
|
||||||
|
|
|
@ -2636,7 +2636,11 @@ static struct query_reg_values_test query_reg_values_tests[] =
|
||||||
/* Name without query routine or DIRECT */
|
/* Name without query routine or DIRECT */
|
||||||
{
|
{
|
||||||
{{ NULL, 0, (WCHAR*)L"WindowsDrive" }},
|
{{ 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 */
|
/* The query routine is called for every value in current key */
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue