File 0002-xml-reader-allow-uppercase-for-lt-gt-and-amp-expansi.patch of Package netcontrol.30089

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

openSUSE Build Service is sponsored by