mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 13:23:38 +00:00
ntdll: Move ACTCTX lpResourceName validation to RtlCreateActivationContext.
This prevents passing NULL resource name to get_manifest_in_module().
This commit is contained in:
parent
b9507d0e5f
commit
d992e2d0aa
|
@ -3804,7 +3804,6 @@ static void test_manifest_resource_name_omitted(void)
|
|||
handle = CreateActCtxW(&ctx);
|
||||
err = GetLastError();
|
||||
ok(handle == INVALID_HANDLE_VALUE, "CreateActCtxW shall fail\n");
|
||||
todo_wine
|
||||
ok(err == ERROR_INVALID_PARAMETER, "got %lu\n", err);
|
||||
|
||||
len = GetModuleFileNameW(NULL, pathbuf, ARRAY_SIZE(pathbuf));
|
||||
|
@ -3828,7 +3827,6 @@ static void test_manifest_resource_name_omitted(void)
|
|||
handle = CreateActCtxW(&ctx);
|
||||
err = GetLastError();
|
||||
ok(handle == INVALID_HANDLE_VALUE, "CreateActCtxW shall fail\n");
|
||||
todo_wine
|
||||
ok(err == ERROR_INVALID_PARAMETER, "got %lu\n", err);
|
||||
}
|
||||
|
||||
|
|
|
@ -2951,8 +2951,6 @@ static NTSTATUS get_manifest_in_module( struct actctx_loader* acl, struct assemb
|
|||
hModule, debugstr_w(filename) );
|
||||
}
|
||||
|
||||
if (!resname) return STATUS_INVALID_PARAMETER;
|
||||
|
||||
info.Type = RT_MANIFEST;
|
||||
info.Language = lang;
|
||||
if (!((ULONG_PTR)resname >> 16))
|
||||
|
@ -5232,6 +5230,9 @@ NTSTATUS WINAPI RtlCreateActivationContext( HANDLE *handle, const void *ptr )
|
|||
(pActCtx->dwFlags & ~ACTCTX_FLAGS_ALL))
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
if ((pActCtx->dwFlags & ACTCTX_FLAG_RESOURCE_NAME_VALID) && !pActCtx->lpResourceName)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
if (!(actctx = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*actctx) )))
|
||||
return STATUS_NO_MEMORY;
|
||||
|
||||
|
|
Loading…
Reference in a new issue