[KERNEL32][NTDLL] Apply Wine commit ab91c01 by Sebastian Lackner: RtlFindActivationContextSectionString should accept a NULL pointer as data. Fixes 15 kernel32:actctx tests. CORE-10536

svn path=/trunk/; revision=70152
This commit is contained in:
Amine Khaldi 2015-11-27 18:06:47 +00:00
parent b73ac49f8c
commit f42267b75a
3 changed files with 52 additions and 37 deletions

View file

@ -132,7 +132,7 @@ BOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags, const GUID* lpExtGuid,
TRACE("%08x %s %u %s %p\n", dwFlags, debugstr_guid(lpExtGuid), TRACE("%08x %s %u %s %p\n", dwFlags, debugstr_guid(lpExtGuid),
ulId, debugstr_a(lpSearchStr), pInfo); ulId, debugstr_a(lpSearchStr), pInfo);
if (!lpSearchStr) if (!lpSearchStr || !pInfo)
{ {
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return FALSE; return FALSE;
@ -160,6 +160,12 @@ BOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags, const GUID* lpExtGuid,
UNICODE_STRING us; UNICODE_STRING us;
NTSTATUS status; NTSTATUS status;
if (!pInfo)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
RtlInitUnicodeString(&us, lpSearchStr); RtlInitUnicodeString(&us, lpSearchStr);
if ((status = RtlFindActivationContextSectionString(dwFlags, lpExtGuid, ulId, &us, pInfo))) if ((status = RtlFindActivationContextSectionString(dwFlags, lpExtGuid, ulId, &us, pInfo)))
{ {

View file

@ -3287,6 +3287,8 @@ static NTSTATUS find_dll_redirection(ACTIVATION_CONTEXT* actctx, const UNICODE_S
DPRINT("index: %d\n", index); DPRINT("index: %d\n", index);
if (!index) return STATUS_SXS_KEY_NOT_FOUND; if (!index) return STATUS_SXS_KEY_NOT_FOUND;
if (data)
{
dll = get_dllredirect_data(actctx, index); dll = get_dllredirect_data(actctx, index);
data->ulDataFormatVersion = 1; data->ulDataFormatVersion = 1;
@ -3300,6 +3302,7 @@ static NTSTATUS find_dll_redirection(ACTIVATION_CONTEXT* actctx, const UNICODE_S
if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG)) if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
data->ulAssemblyRosterIndex = index->rosterindex; data->ulAssemblyRosterIndex = index->rosterindex;
}
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
@ -3496,6 +3499,8 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
if (!index) return STATUS_SXS_KEY_NOT_FOUND; if (!index) return STATUS_SXS_KEY_NOT_FOUND;
if (data)
{
class = get_wndclass_data(actctx, index); class = get_wndclass_data(actctx, index);
data->ulDataFormatVersion = 1; data->ulDataFormatVersion = 1;
@ -3510,6 +3515,7 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG)) if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
data->ulAssemblyRosterIndex = index->rosterindex; data->ulAssemblyRosterIndex = index->rosterindex;
}
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
@ -4551,6 +4557,8 @@ static NTSTATUS find_progid_redirection(ACTIVATION_CONTEXT* actctx, const UNICOD
index = find_string_index(actctx->progid_section, name); index = find_string_index(actctx->progid_section, name);
if (!index) return STATUS_SXS_KEY_NOT_FOUND; if (!index) return STATUS_SXS_KEY_NOT_FOUND;
if (data)
{
progid = get_progid_data(actctx, index); progid = get_progid_data(actctx, index);
data->ulDataFormatVersion = 1; data->ulDataFormatVersion = 1;
@ -4564,6 +4572,7 @@ static NTSTATUS find_progid_redirection(ACTIVATION_CONTEXT* actctx, const UNICOD
if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG)) if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
data->ulAssemblyRosterIndex = index->rosterindex; data->ulAssemblyRosterIndex = index->rosterindex;
}
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
@ -4595,7 +4604,7 @@ static NTSTATUS find_string(ACTIVATION_CONTEXT* actctx, ULONG section_kind,
if (status != STATUS_SUCCESS) return status; if (status != STATUS_SUCCESS) return status;
if (flags & FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX) if (data && (flags & FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX))
{ {
actctx_addref(actctx); actctx_addref(actctx);
data->hActCtx = actctx; data->hActCtx = actctx;

View file

@ -266,7 +266,7 @@ gdi32 -
reactos/dll/win32/gdi32/objects/linedda.c # Synced at 20090410 reactos/dll/win32/gdi32/objects/linedda.c # Synced at 20090410
kernel32 - kernel32 -
reactos/dll/win32/kernel32/wine/actctx.c # Partly synced with Wine 1.7.17 reactos/dll/win32/kernel32/wine/actctx.c # Partly synced with Wine 1.7.55
reactos/dll/win32/kernel32/wine/comm.c # Synced in r52754 reactos/dll/win32/kernel32/wine/comm.c # Synced in r52754
reactos/dll/win32/kernel32/wine/lzexpand.c # Synced in r52754 reactos/dll/win32/kernel32/wine/lzexpand.c # Synced in r52754
reactos/dll/win32/kernel32/wine/profile.c # Synced in r52754 reactos/dll/win32/kernel32/wine/profile.c # Synced in r52754