Alexandre Julliard : ntdll:
Cope with missing assemblyIdentity elements in manifests.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jul 20 06:02:14 CDT 2007
Module: wine
Branch: master
Commit: b2b6fc1288525f290129ed8bfddd886fe090e3cc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b2b6fc1288525f290129ed8bfddd886fe090e3cc
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jul 19 18:13:27 2007 +0200
ntdll: Cope with missing assemblyIdentity elements in manifests.
---
dlls/ntdll/actctx.c | 30 +++++++++++++-----------------
1 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index 26bdf31..eb4214a 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -1174,7 +1174,6 @@ static BOOL parse_assembly_elem(xmlbuf_t* xmlbuf, struct actctx_loader* acl,
{
xmlstr_t attr_name, attr_value, elem;
BOOL end = FALSE, error, version = FALSE, xmlns = FALSE, ret = TRUE;
- struct assembly_identity ai;
TRACE("(%p)\n", xmlbuf);
@@ -1224,28 +1223,24 @@ static BOOL parse_assembly_elem(xmlbuf_t* xmlbuf, struct actctx_loader* acl,
else if (assembly->type == ASSEMBLY_MANIFEST && assembly->no_inherit)
return FALSE;
- if (!xmlstr_cmp(&elem, ASSEMBLYIDENTITY_ELEM))
+ if (xmlstr_cmp(&elem, ASSEMBLYIDENTITY_ELEM))
{
- WARN("expected assemblyIdentity element, got %s\n", debugstr_xmlstr(&elem));
- return FALSE;
- }
-
- if (!parse_assembly_identity_elem(xmlbuf, acl->actctx, &ai)) return FALSE;
+ if (!parse_assembly_identity_elem(xmlbuf, acl->actctx, &assembly->id)) return FALSE;
+ ret = next_xml_elem(xmlbuf, &elem);
- if (expected_ai)
- {
- /* FIXME: more tests */
- if (assembly->type == ASSEMBLY_MANIFEST &&
- memcmp(&ai.version, &expected_ai->version, sizeof(ai.version)))
+ if (expected_ai)
{
- WARN("wrong version\n");
- return FALSE;
+ /* FIXME: more tests */
+ if (assembly->type == ASSEMBLY_MANIFEST &&
+ memcmp(&assembly->id.version, &expected_ai->version, sizeof(assembly->id.version)))
+ {
+ FIXME("wrong version\n");
+ return FALSE;
+ }
}
}
- assembly->id = ai;
-
- while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
+ while (ret)
{
if (xmlstr_cmp(&elem, ELEM_END(ASSEMBLY_ELEM)))
{
@@ -1281,6 +1276,7 @@ static BOOL parse_assembly_elem(xmlbuf_t* xmlbuf, struct actctx_loader* acl,
WARN("wrong element %s\n", debugstr_xmlstr(&elem));
ret = FALSE;
}
+ if (ret) ret = next_xml_elem(xmlbuf, &elem);
}
return ret;
More information about the wine-cvs
mailing list