Skip to content
Snippets Groups Projects
Commit c8f69b18 authored by Pavel Zhukov's avatar Pavel Zhukov
Browse files

libabigail: Escape parameters names


In some go application parameters names can be parsed as XML specific
instruction. Escaping them to fix abicheck failures.

Signed-off-by: default avatarPavel Zhukov <pavel.zhukov@huawei.com>
parent e6b084e1
No related branches found
No related tags found
1 merge request!6libabigail: Escape parameters names
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
......@@ -8,7 +8,9 @@ SRC_URI[md5sum] = "3972df59e3b85ad157f219c9df547fca"
SRC_URI[sha256sum] = "3704ae97a56bf076ca08fb5dea6b21db998fbbf14c4f9de12824b78db53b6fda"
SRC_URI = "https://mirrors.kernel.org/sourceware/libabigail/libabigail-${PV}.tar.gz;sha512sum=${SHA512SUM} \
file://0001-Escape-the-value-of-the-symbols-name-attribute.patch "
file://0001-Escape-the-value-of-the-symbols-name-attribute.patch \
file://0001-abg-writer.cc-Escape-parameter-names.patch \
"
LIC_FILES_CHKSUM = " \
file://LICENSE.txt;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment