* [PATCH] Escape the value of the symbols name attribute
@ 2022-01-11 13:10 Pavel Zhukov
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Zhukov @ 2022-01-11 13:10 UTC (permalink / raw)
To: libabigail; +Cc: Pavel Zhukov, pavel
From: Pavel Zhukov <pavel.zhukov@huawei.com>
Symbols name may include < and > characters (go-runtime is an example)
which causes xml parsers to fail.
Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
---
src/abg-writer.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index 76ce809b..e2239e01 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -3111,7 +3111,7 @@ write_elf_symbol(const elf_symbol_sptr& sym,
annotate(sym, ctxt, indent);
do_indent(o, indent);
- o << "<elf-symbol name='" << sym->get_name() << "'";
+ o << "<elf-symbol name='" << xml::escape_xml_string(sym->get_name()) << "'";
if (sym->is_variable() && sym->get_size())
o << " size='" << sym->get_size() << "'";
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Escape the value of the symbols name attribute
@ 2022-01-11 13:21 Pavel Zhukov
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Zhukov @ 2022-01-11 13:21 UTC (permalink / raw)
To: libabigail; +Cc: pavel, Pavel Zhukov
Symbols name may include < and > characters (go-runtime is an example)
which causes xml parsers to fail.
Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
---
src/abg-writer.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index 76ce809b..e2239e01 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -3111,7 +3111,7 @@ write_elf_symbol(const elf_symbol_sptr& sym,
annotate(sym, ctxt, indent);
do_indent(o, indent);
- o << "<elf-symbol name='" << sym->get_name() << "'";
+ o << "<elf-symbol name='" << xml::escape_xml_string(sym->get_name()) << "'";
if (sym->is_variable() && sym->get_size())
o << " size='" << sym->get_size() << "'";
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-11 13:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 13:10 [PATCH] Escape the value of the symbols name attribute Pavel Zhukov
2022-01-11 13:21 Pavel Zhukov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).