zapit: avoid unaligned access in parseBouquetsXml()

SH4 kernels are complaining about unaligned accesses when bouquets.xml
with urls are parsed. Even though this should be fixed in the XML
parsing library, this seems not easy, so let's add a simple workaround
to avoid the messages in the kernel log.


Origin commit data
------------------
Commit: cdb83748f1
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2021-10-18 (Mon, 18 Oct 2021)
This commit is contained in:
Stefan Seyfried
2021-10-18 18:25:57 +02:00
committed by vanhofen
parent 4efe2cfdcf
commit c975df9a78

View File

@@ -449,6 +449,9 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
if (uName)
uname = uName;
const char *url = xmlGetAttribute(channel_node, "u");
if (url && ((uintptr_t)url % 4))
url = std::string(url).c_str(); /* hack to ensure buffer is aligned */
GET_ATTR(channel_node, "i", SCANF_SERVICE_ID_TYPE, service_id);
GET_ATTR(channel_node, "on", SCANF_ORIGINAL_NETWORK_ID_TYPE, original_network_id);
GET_ATTR(channel_node, "s", SCANF_SATELLITE_POSITION_TYPE, satellitePosition);