netcontrol/0002-xml-reader-allow-uppercase-for-lt-gt-and-amp-expansi.patch
Clemens Famulla-Conrad 9b8ad7d63f - Fix EOF handling in xml-reader to avoid virsh iface-* commands
hang on aarch64 (bsc#1213349)
  [+ 0001-xml-reader-fix-xml_getc-and-xml_ungetc.patch,
   + 0002-xml-reader-allow-uppercase-for-lt-gt-and-amp-expansi.patch]

OBS-URL: https://build.opensuse.org/package/show/network:utilities/netcontrol?expand=0&rev=37
2023-07-21 15:17:18 +00:00

32 lines
874 B
Diff

From 9a38e053226d01721126a21ee80396488782995d Mon Sep 17 00:00:00 2001
From: Clemens Famulla-Conrad <cfamullaconrad@suse.de>
Date: Fri, 21 Jul 2023 15:59:00 +0200
Subject: [PATCH 2/2] xml-reader: allow uppercase for &lt;, &gt; and &amp;
expansion
References: bsc#1213349
Upstream: yes
diff --git a/src/xml-reader.c b/src/xml-reader.c
index e5e9587..1ab16ea 100644
--- a/src/xml-reader.c
+++ b/src/xml-reader.c
@@ -689,11 +689,11 @@ xml_expand_entity(xml_reader_t *xr, nc_stringbuf_t *res)
return 0;
}
- if (!strcmp(entity.string, "lt"))
+ if (!strcasecmp(entity.string, "lt"))
expanded = '<';
- else if (!strcmp(entity.string, "gt"))
+ else if (!strcasecmp(entity.string, "gt"))
expanded = '>';
- else if (!strcmp(entity.string, "amp"))
+ else if (!strcasecmp(entity.string, "amp"))
expanded = '&';
else {
const char *es = entity.string;
--
2.35.3