You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Remove various patches (accepted upstream).
This commit is contained in:
@@ -1,209 +0,0 @@
|
||||
From bf350677af12ec558208b215f6fcff61c7082bac Mon Sep 17 00:00:00 2001
|
||||
From: Mark Jansen <learn0more@gmail.com>
|
||||
Date: Sun, 15 Mar 2015 23:39:09 +0100
|
||||
Subject: kernel32/tests: Parameter validation tests for FindActCtxSectionString
|
||||
|
||||
Highlight some differences between FindActCtxSectionString parameter validation, and its Rtl implementation.
|
||||
---
|
||||
dlls/kernel32/tests/actctx.c | 150 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 148 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
|
||||
index 60763b1..887c6b0 100644
|
||||
--- a/dlls/kernel32/tests/actctx.c
|
||||
+++ b/dlls/kernel32/tests/actctx.c
|
||||
@@ -16,6 +16,8 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
+#include "ntstatus.h"
|
||||
+#define WIN32_NO_STATUS
|
||||
#include "wine/test.h"
|
||||
#include <winbase.h>
|
||||
#include <windef.h>
|
||||
@@ -39,6 +41,10 @@ static BOOL (WINAPI *pQueryActCtxW)(DWORD,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE
|
||||
static VOID (WINAPI *pReleaseActCtx)(HANDLE);
|
||||
static BOOL (WINAPI *pFindActCtxSectionGuid)(DWORD,const GUID*,ULONG,const GUID*,PACTCTX_SECTION_KEYED_DATA);
|
||||
|
||||
+static NTSTATUS(NTAPI *pRtlFindActivationContextSectionString)(DWORD,const GUID *,ULONG,PUNICODE_STRING,PACTCTX_SECTION_KEYED_DATA);
|
||||
+static BOOLEAN (NTAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, PCSZ);
|
||||
+static VOID (NTAPI *pRtlFreeUnicodeString)(PUNICODE_STRING);
|
||||
+
|
||||
static const char* strw(LPCWSTR x)
|
||||
{
|
||||
static char buffer[1024];
|
||||
@@ -2048,6 +2054,140 @@ static void test_app_manifest(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static HANDLE create_manifest(const char *filename, const char *data, int line)
|
||||
+{
|
||||
+ HANDLE handle;
|
||||
+ create_manifest_file(filename, data, -1, NULL, NULL);
|
||||
+
|
||||
+ handle = test_create(filename);
|
||||
+ ok_(__FILE__, line)(handle != INVALID_HANDLE_VALUE,
|
||||
+ "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
|
||||
+
|
||||
+ DeleteFileA(filename);
|
||||
+ return handle;
|
||||
+}
|
||||
+
|
||||
+static void kernel32_find(ULONG section, const char *string_to_find, BOOL should_find, BOOL todo, int line)
|
||||
+{
|
||||
+ UNICODE_STRING string_to_findW;
|
||||
+ ACTCTX_SECTION_KEYED_DATA data;
|
||||
+ BOOL ret;
|
||||
+ DWORD err;
|
||||
+
|
||||
+ pRtlCreateUnicodeStringFromAsciiz(&string_to_findW, string_to_find);
|
||||
+
|
||||
+ memset(&data, 0xfe, sizeof(data));
|
||||
+ data.cbSize = sizeof(data);
|
||||
+
|
||||
+ SetLastError(0);
|
||||
+ ret = pFindActCtxSectionStringA(0, NULL, section, string_to_find, &data);
|
||||
+ err = GetLastError();
|
||||
+ ok_(__FILE__, line)(ret == should_find,
|
||||
+ "FindActCtxSectionStringA: expected ret = %u, got %u\n", should_find, ret);
|
||||
+ if (todo)
|
||||
+ todo_wine
|
||||
+ ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
|
||||
+ "FindActCtxSectionStringA: unexpected error %u\n", err);
|
||||
+ else
|
||||
+ ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
|
||||
+ "FindActCtxSectionStringA: unexpected error %u\n", err);
|
||||
+
|
||||
+ memset(&data, 0xfe, sizeof(data));
|
||||
+ data.cbSize = sizeof(data);
|
||||
+
|
||||
+ SetLastError(0);
|
||||
+ ret = pFindActCtxSectionStringW(0, NULL, section, string_to_findW.Buffer, &data);
|
||||
+ err = GetLastError();
|
||||
+ ok_(__FILE__, line)(ret == should_find,
|
||||
+ "FindActCtxSectionStringW: expected ret = %u, got %u\n", should_find, ret);
|
||||
+ if (todo)
|
||||
+ todo_wine
|
||||
+ ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
|
||||
+ "FindActCtxSectionStringW: unexpected error %u\n", err);
|
||||
+ else
|
||||
+ ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
|
||||
+ "FindActCtxSectionStringW: unexpected error %u\n", err);
|
||||
+
|
||||
+ SetLastError(0);
|
||||
+ ret = pFindActCtxSectionStringA(0, NULL, section, string_to_find, NULL);
|
||||
+ err = GetLastError();
|
||||
+ ok_(__FILE__, line)(!ret,
|
||||
+ "FindActCtxSectionStringA: expected failure, got %u\n", ret);
|
||||
+ ok_(__FILE__, line)(err == ERROR_INVALID_PARAMETER,
|
||||
+ "FindActCtxSectionStringA: unexpected error %u\n", err);
|
||||
+
|
||||
+ SetLastError(0);
|
||||
+ ret = pFindActCtxSectionStringW(0, NULL, section, string_to_findW.Buffer, NULL);
|
||||
+ err = GetLastError();
|
||||
+ ok_(__FILE__, line)(!ret,
|
||||
+ "FindActCtxSectionStringW: expected failure, got %u\n", ret);
|
||||
+ ok_(__FILE__, line)(err == ERROR_INVALID_PARAMETER,
|
||||
+ "FindActCtxSectionStringW: unexpected error %u\n", err);
|
||||
+
|
||||
+ pRtlFreeUnicodeString(&string_to_findW);
|
||||
+}
|
||||
+
|
||||
+static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_find, BOOL todo, int line)
|
||||
+{
|
||||
+ UNICODE_STRING string_to_findW;
|
||||
+ ACTCTX_SECTION_KEYED_DATA data;
|
||||
+ NTSTATUS ret;
|
||||
+
|
||||
+ pRtlCreateUnicodeStringFromAsciiz(&string_to_findW, string_to_find);
|
||||
+
|
||||
+ memset(&data, 0xfe, sizeof(data));
|
||||
+ data.cbSize = sizeof(data);
|
||||
+
|
||||
+ ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, &data);
|
||||
+ if (todo)
|
||||
+ todo_wine
|
||||
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
|
||||
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
|
||||
+ else
|
||||
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
|
||||
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
|
||||
+
|
||||
+ ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, NULL);
|
||||
+ todo_wine
|
||||
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
|
||||
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
|
||||
+
|
||||
+ pRtlFreeUnicodeString(&string_to_findW);
|
||||
+}
|
||||
+
|
||||
+static void test_findsectionstring(void)
|
||||
+{
|
||||
+ HANDLE handle;
|
||||
+ BOOL ret;
|
||||
+ ULONG_PTR cookie;
|
||||
+
|
||||
+ handle = create_manifest("test.manifest", testdep_manifest3, __LINE__);
|
||||
+ ret = pActivateActCtx(handle, &cookie);
|
||||
+ ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
|
||||
+
|
||||
+ /* first we show the parameter validation from kernel32 */
|
||||
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, TRUE, __LINE__);
|
||||
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib.dll", TRUE, FALSE, __LINE__);
|
||||
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib2.dll", TRUE, FALSE, __LINE__);
|
||||
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib3.dll", FALSE, FALSE, __LINE__);
|
||||
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass", TRUE, FALSE, __LINE__);
|
||||
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass2", TRUE, FALSE, __LINE__);
|
||||
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, FALSE, __LINE__);
|
||||
+
|
||||
+ /* then we show that ntdll plays by different rules */
|
||||
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, TRUE, __LINE__);
|
||||
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib.dll", TRUE, FALSE, __LINE__);
|
||||
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib2.dll", TRUE, FALSE, __LINE__);
|
||||
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib3.dll", FALSE, FALSE, __LINE__);
|
||||
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass", TRUE, FALSE, __LINE__);
|
||||
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass2", TRUE, FALSE, __LINE__);
|
||||
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, FALSE, __LINE__);
|
||||
+
|
||||
+ ret = pDeactivateActCtx(0, cookie);
|
||||
+ ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
|
||||
+ pReleaseActCtx(handle);
|
||||
+}
|
||||
+
|
||||
static void run_child_process(void)
|
||||
{
|
||||
char cmdline[MAX_PATH];
|
||||
@@ -2263,9 +2403,9 @@ todo_wine
|
||||
|
||||
static BOOL init_funcs(void)
|
||||
{
|
||||
- HMODULE hKernel32 = GetModuleHandleA("kernel32.dll");
|
||||
+ HMODULE hLibrary = GetModuleHandleA("kernel32.dll");
|
||||
|
||||
-#define X(f) if (!(p##f = (void*)GetProcAddress(hKernel32, #f))) return FALSE;
|
||||
+#define X(f) if (!(p##f = (void*)GetProcAddress(hLibrary, #f))) return FALSE;
|
||||
X(ActivateActCtx);
|
||||
X(CreateActCtxA);
|
||||
X(CreateActCtxW);
|
||||
@@ -2277,6 +2417,11 @@ static BOOL init_funcs(void)
|
||||
X(QueryActCtxW);
|
||||
X(ReleaseActCtx);
|
||||
X(FindActCtxSectionGuid);
|
||||
+
|
||||
+ hLibrary = GetModuleHandleA("ntdll.dll");
|
||||
+ X(RtlFindActivationContextSectionString);
|
||||
+ X(RtlCreateUnicodeStringFromAsciiz);
|
||||
+ X(RtlFreeUnicodeString);
|
||||
#undef X
|
||||
|
||||
return TRUE;
|
||||
@@ -2303,5 +2448,6 @@ START_TEST(actctx)
|
||||
|
||||
test_actctx();
|
||||
test_CreateActCtx();
|
||||
+ test_findsectionstring();
|
||||
run_child_process();
|
||||
}
|
||||
--
|
||||
2.3.2
|
||||
|
@@ -1,188 +0,0 @@
|
||||
From ff94fa5c83c5f8c9e74ada24dfa8bc5c4e87f848 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 16 Mar 2015 03:38:58 +0100
|
||||
Subject: ntdll: RtlFindActivationContextSectionString should accept a NULL
|
||||
pointer as data.
|
||||
|
||||
---
|
||||
dlls/kernel32/actctx.c | 8 ++++-
|
||||
dlls/kernel32/tests/actctx.c | 10 ++++--
|
||||
dlls/ntdll/actctx.c | 81 ++++++++++++++++++++++++--------------------
|
||||
3 files changed, 59 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/actctx.c b/dlls/kernel32/actctx.c
|
||||
index bcf95ec..2eb1c2a 100644
|
||||
--- a/dlls/kernel32/actctx.c
|
||||
+++ b/dlls/kernel32/actctx.c
|
||||
@@ -227,7 +227,7 @@ BOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags, const GUID* lpExtGuid,
|
||||
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;
|
||||
@@ -255,6 +255,12 @@ BOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags, const GUID* lpExtGuid,
|
||||
UNICODE_STRING us;
|
||||
NTSTATUS status;
|
||||
|
||||
+ if (!pInfo)
|
||||
+ {
|
||||
+ SetLastError(ERROR_INVALID_PARAMETER);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
RtlInitUnicodeString(&us, lpSearchStr);
|
||||
if ((status = RtlFindActivationContextSectionString(dwFlags, lpExtGuid, ulId, &us, pInfo)))
|
||||
{
|
||||
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
|
||||
index 887c6b0..7512aed 100644
|
||||
--- a/dlls/kernel32/tests/actctx.c
|
||||
+++ b/dlls/kernel32/tests/actctx.c
|
||||
@@ -2148,9 +2148,13 @@ static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_fi
|
||||
"RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
|
||||
|
||||
ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, NULL);
|
||||
- todo_wine
|
||||
- ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
|
||||
- "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
|
||||
+ if (todo)
|
||||
+ todo_wine
|
||||
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
|
||||
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
|
||||
+ else
|
||||
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
|
||||
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
|
||||
|
||||
pRtlFreeUnicodeString(&string_to_findW);
|
||||
}
|
||||
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
|
||||
index 20a98ec..638daac 100644
|
||||
--- a/dlls/ntdll/actctx.c
|
||||
+++ b/dlls/ntdll/actctx.c
|
||||
@@ -3134,19 +3134,22 @@ static NTSTATUS find_dll_redirection(ACTIVATION_CONTEXT* actctx, const UNICODE_S
|
||||
index = find_string_index(actctx->dllredirect_section, name);
|
||||
if (!index) return STATUS_SXS_KEY_NOT_FOUND;
|
||||
|
||||
- dll = get_dllredirect_data(actctx, index);
|
||||
+ 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( GetProcessHeap(), 0, actctx->dllredirect_section );
|
||||
- data->hActCtx = NULL;
|
||||
+ data->ulDataFormatVersion = 1;
|
||||
+ data->lpData = dll;
|
||||
+ data->ulLength = dll->size;
|
||||
+ data->lpSectionGlobalData = NULL;
|
||||
+ data->ulSectionGlobalDataLength = 0;
|
||||
+ data->lpSectionBase = actctx->dllredirect_section;
|
||||
+ data->ulSectionTotalLength = RtlSizeHeap( GetProcessHeap(), 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->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
|
||||
+ data->ulAssemblyRosterIndex = index->rosterindex;
|
||||
+ }
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -3343,20 +3346,23 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
|
||||
|
||||
if (!index) return STATUS_SXS_KEY_NOT_FOUND;
|
||||
|
||||
- class = get_wndclass_data(actctx, index);
|
||||
+ 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( GetProcessHeap(), 0, actctx->wndclass_section );
|
||||
- data->hActCtx = NULL;
|
||||
+ 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( GetProcessHeap(), 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->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
|
||||
+ data->ulAssemblyRosterIndex = index->rosterindex;
|
||||
+ }
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -4398,19 +4404,22 @@ static NTSTATUS find_progid_redirection(ACTIVATION_CONTEXT* actctx, const UNICOD
|
||||
index = find_string_index(actctx->progid_section, name);
|
||||
if (!index) return STATUS_SXS_KEY_NOT_FOUND;
|
||||
|
||||
- progid = get_progid_data(actctx, index);
|
||||
+ 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( GetProcessHeap(), 0, actctx->progid_section );
|
||||
- data->hActCtx = NULL;
|
||||
+ 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( GetProcessHeap(), 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->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
|
||||
+ data->ulAssemblyRosterIndex = index->rosterindex;
|
||||
+ }
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -4442,7 +4451,7 @@ static NTSTATUS find_string(ACTIVATION_CONTEXT* actctx, ULONG section_kind,
|
||||
|
||||
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;
|
||||
@@ -5009,7 +5018,7 @@ NTSTATUS WINAPI RtlFindActivationContextSectionString( ULONG flags, const GUID *
|
||||
FIXME("unknown flags %08x\n", flags);
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
- if (!data || data->cbSize < offsetof(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) ||
|
||||
+ if ((data && data->cbSize < offsetof(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex)) ||
|
||||
!section_name || !section_name->Buffer)
|
||||
{
|
||||
WARN("invalid parameter\n");
|
||||
--
|
||||
2.3.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: Fix wrong return values of RtlFindActivationContextSectionString for NULL data
|
Reference in New Issue
Block a user