From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/kernel32/tests/actctx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index c6796a1ac64..770c3751a1c 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -542,6 +542,8 @@ static const char builtin_dll_manifest[] = " </dependency>" "</assembly>";
+static const char empty_assembly_manifest[] = +"<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" />";
DEFINE_GUID(VISTA_COMPAT_GUID, 0xe2011457, 0x1546, 0x43c5, 0xa5, 0xfe, 0x00, 0x8d, 0xee, 0xe3, 0xd3, 0xf0); DEFINE_GUID(WIN7_COMPAT_GUID, 0x35138b9a, 0x5d96, 0x4fbd, 0x8e, 0x2d, 0xa2, 0x44, 0x02, 0x25, 0xf9, 0x3a); @@ -2516,6 +2518,18 @@ static void test_actctx(void) ReleaseActCtx(handle); }
+ /* Empty <assembly/> element. */ + create_manifest_file("empty_assembly.manifest", empty_assembly_manifest, -1, NULL, NULL); + handle = test_create("empty_assembly.manifest"); + todo_wine + ok(handle != INVALID_HANDLE_VALUE, "Failed to create activation context.\n"); + DeleteFileA("empty_assembly.manifest"); + if (handle != INVALID_HANDLE_VALUE) + { + test_basic_info(handle, __LINE__); + ReleaseActCtx(handle); + } + test_wndclass_section(); test_dllredirect_section(); test_typelib_section();
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/kernel32/tests/actctx.c | 1 - dlls/ntdll/actctx.c | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index 770c3751a1c..d468777ac2f 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -2521,7 +2521,6 @@ static void test_actctx(void) /* Empty <assembly/> element. */ create_manifest_file("empty_assembly.manifest", empty_assembly_manifest, -1, NULL, NULL); handle = test_create("empty_assembly.manifest"); - todo_wine ok(handle != INVALID_HANDLE_VALUE, "Failed to create activation context.\n"); DeleteFileA("empty_assembly.manifest"); if (handle != INVALID_HANDLE_VALUE) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 853ac34d12e..9f2c1d54720 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -2708,12 +2708,15 @@ static void parse_assembly_elem( xmlbuf_t *xmlbuf, struct assembly* assembly, } }
- if (end || !version) + if (!version) { set_error( xmlbuf ); return; }
+ if (end) + return; + while (next_xml_elem(xmlbuf, &elem, parent)) { if (assembly->type == APPLICATION_MANIFEST && xml_elem_cmp(&elem, L"noInherit", asmv1W))