Nikolay Sivov : ntdll: Fix 'description' element parsing to allow empty elements.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 29 15:42:42 CST 2014
Module: wine
Branch: master
Commit: c134466224d0e709ab7ffc206013f79d70fe27d4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c134466224d0e709ab7ffc206013f79d70fe27d4
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Dec 26 21:07:46 2014 +0300
ntdll: Fix 'description' element parsing to allow empty elements.
---
dlls/kernel32/tests/actctx.c | 1 +
dlls/ntdll/actctx.c | 13 +++++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index 97e7dd2..e30d985 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -97,6 +97,7 @@ static const char manifest3[] =
"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
"<assemblyIdentity version=\"1.2.3.4\" name=\"Wine.Test\" type=\"win32\""
" publicKeyToken=\"6595b6414666f1df\" />"
+"<description />"
"<file name=\"testlib.dll\">"
"<windowClass>wndClass</windowClass>"
" <comClass description=\"Test com class\""
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index 8fb6624..ba6378e 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -1834,11 +1834,16 @@ static BOOL parse_binding_redirect_elem(xmlbuf_t* xmlbuf)
static BOOL parse_description_elem(xmlbuf_t* xmlbuf)
{
- xmlstr_t elem, content;
- BOOL end = FALSE, ret = TRUE;
+ xmlstr_t elem, content, attr_name, attr_value;
+ BOOL end = FALSE, ret = TRUE, error = FALSE;
- if (!parse_expect_no_attr(xmlbuf, &end) || end ||
- !parse_text_content(xmlbuf, &content))
+ while (next_xml_attr(xmlbuf, &attr_name, &attr_value, &error, &end))
+ WARN("unknown attr %s=%s\n", debugstr_xmlstr(&attr_name), debugstr_xmlstr(&attr_value));
+
+ if (error) return FALSE;
+ if (end) return TRUE;
+
+ if (!parse_text_content(xmlbuf, &content))
return FALSE;
TRACE("Got description %s\n", debugstr_xmlstr(&content));
More information about the wine-cvs
mailing list