Skip to content
Snippets Groups Projects

libabigail: Escape parameters names

Merged Pavel Zhukov requested to merge landgraf/meta-binaryaudit:params_escape into oniro/kirkstone
2 files
+ 34
1
Compare changes
  • Side-by-side
  • Inline
Files
2
From d8fd4b6d65dc2394f39bc946393d45ef51528526 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pavel.zhukov@huawei.com>
Date: Fri, 29 Jul 2022 10:24:05 +0200
Subject: [PATCH] abg-writer.cc: Escape parameter names
Cc: pavel@zhukoff.net
Fix breakage with some go application where parameter names may include
XML characters
Upstream-Status: Pending
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 3fab488b..304c1dff 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -3459,7 +3459,7 @@ write_function_decl(const function_decl_sptr& decl, write_context& ctxt,
ctxt.record_type_as_referenced(parm_type);
if (ctxt.get_write_parameter_names() && !(*pi)->get_name().empty())
- o << " name='" << (*pi)->get_name() << "'";
+ o << " name='" << xml::escape_xml_string((*pi)->get_name()) << "'";
}
write_is_artificial(*pi, o);
write_location((*pi)->get_location(), ctxt);
--
2.35.1
Loading