Author: akhaldi Date: Fri Nov 27 18:06:47 2015 New Revision: 70152
URL: http://svn.reactos.org/svn/reactos?rev=70152&view=rev Log: [KERNEL32][NTDLL] Apply Wine commit ab91c01 by Sebastian Lackner: RtlFindActivationContextSectionString should accept a NULL pointer as data. Fixes 15 kernel32:actctx tests. CORE-10536
Modified: trunk/reactos/dll/win32/kernel32/wine/actctx.c trunk/reactos/lib/rtl/actctx.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/kernel32/wine/actctx.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/wine/act... ============================================================================== --- trunk/reactos/dll/win32/kernel32/wine/actctx.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/wine/actctx.c [iso-8859-1] Fri Nov 27 18:06:47 2015 @@ -132,7 +132,7 @@ TRACE("%08x %s %u %s %p\n", dwFlags, debugstr_guid(lpExtGuid), ulId, debugstr_a(lpSearchStr), pInfo);
- if (!lpSearchStr) + if (!lpSearchStr || !pInfo) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; @@ -159,6 +159,12 @@ { UNICODE_STRING us; NTSTATUS status; + + if (!pInfo) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + }
RtlInitUnicodeString(&us, lpSearchStr); if ((status = RtlFindActivationContextSectionString(dwFlags, lpExtGuid, ulId, &us, pInfo)))
Modified: trunk/reactos/lib/rtl/actctx.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=70152&... ============================================================================== --- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Fri Nov 27 18:06:47 2015 @@ -3287,19 +3287,22 @@ DPRINT("index: %d\n", index); if (!index) return STATUS_SXS_KEY_NOT_FOUND;
- dll = get_dllredirect_data(actctx, index); - - data->ulDataFormatVersion = 1; - data->lpData = dll; - data->ulLength = dll->size; - data->lpSectionGlobalData = NULL; - data->ulSectionGlobalDataLength = 0; - data->lpSectionBase = actctx->dllredirect_section; - data->ulSectionTotalLength = RtlSizeHeap( RtlGetProcessHeap(), 0, actctx->dllredirect_section ); - data->hActCtx = NULL; - - if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG)) - data->ulAssemblyRosterIndex = index->rosterindex; + if (data) + { + dll = get_dllredirect_data(actctx, index); + + data->ulDataFormatVersion = 1; + data->lpData = dll; + data->ulLength = dll->size; + data->lpSectionGlobalData = NULL; + data->ulSectionGlobalDataLength = 0; + data->lpSectionBase = actctx->dllredirect_section; + data->ulSectionTotalLength = RtlSizeHeap( RtlGetProcessHeap(), 0, actctx->dllredirect_section ); + data->hActCtx = NULL; + + if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG)) + data->ulAssemblyRosterIndex = index->rosterindex; + }
return STATUS_SUCCESS; } @@ -3496,20 +3499,23 @@
if (!index) return STATUS_SXS_KEY_NOT_FOUND;
- class = get_wndclass_data(actctx, index); - - data->ulDataFormatVersion = 1; - data->lpData = class; - /* full length includes string length with nulls */ - data->ulLength = class->size + class->name_len + class->module_len + 2*sizeof(WCHAR); - data->lpSectionGlobalData = NULL; - data->ulSectionGlobalDataLength = 0; - data->lpSectionBase = actctx->wndclass_section; - data->ulSectionTotalLength = RtlSizeHeap( RtlGetProcessHeap(), 0, actctx->wndclass_section ); - data->hActCtx = NULL; - - if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG)) - data->ulAssemblyRosterIndex = index->rosterindex; + if (data) + { + class = get_wndclass_data(actctx, index); + + data->ulDataFormatVersion = 1; + data->lpData = class; + /* full length includes string length with nulls */ + data->ulLength = class->size + class->name_len + class->module_len + 2*sizeof(WCHAR); + data->lpSectionGlobalData = NULL; + data->ulSectionGlobalDataLength = 0; + data->lpSectionBase = actctx->wndclass_section; + data->ulSectionTotalLength = RtlSizeHeap( RtlGetProcessHeap(), 0, actctx->wndclass_section ); + data->hActCtx = NULL; + + if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG)) + data->ulAssemblyRosterIndex = index->rosterindex; + }
return STATUS_SUCCESS; } @@ -4551,19 +4557,22 @@ index = find_string_index(actctx->progid_section, name); if (!index) return STATUS_SXS_KEY_NOT_FOUND;
- progid = get_progid_data(actctx, index); - - data->ulDataFormatVersion = 1; - data->lpData = progid; - data->ulLength = progid->size; - data->lpSectionGlobalData = (BYTE*)actctx->progid_section + actctx->progid_section->global_offset; - data->ulSectionGlobalDataLength = actctx->progid_section->global_len; - data->lpSectionBase = actctx->progid_section; - data->ulSectionTotalLength = RtlSizeHeap( RtlGetProcessHeap(), 0, actctx->progid_section ); - data->hActCtx = NULL; - - if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG)) - data->ulAssemblyRosterIndex = index->rosterindex; + if (data) + { + progid = get_progid_data(actctx, index); + + data->ulDataFormatVersion = 1; + data->lpData = progid; + data->ulLength = progid->size; + data->lpSectionGlobalData = (BYTE*)actctx->progid_section + actctx->progid_section->global_offset; + data->ulSectionGlobalDataLength = actctx->progid_section->global_len; + data->lpSectionBase = actctx->progid_section; + data->ulSectionTotalLength = RtlSizeHeap( RtlGetProcessHeap(), 0, actctx->progid_section ); + data->hActCtx = NULL; + + if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG)) + data->ulAssemblyRosterIndex = index->rosterindex; + }
return STATUS_SUCCESS; } @@ -4595,7 +4604,7 @@
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); data->hActCtx = actctx;
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=7... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Nov 27 18:06:47 2015 @@ -266,7 +266,7 @@ reactos/dll/win32/gdi32/objects/linedda.c # Synced at 20090410
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/lzexpand.c # Synced in r52754 reactos/dll/win32/kernel32/wine/profile.c # Synced in r52754