mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
eitd/xmlutil.cpp: fix crash, if epg data saved with older image -
item/item_description can be present and break parsing
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1f65f1bc80
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-11-15 (Thu, 15 Nov 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -334,16 +334,18 @@ void *insertEventsfromFile(void * data)
|
|||||||
std::string(xmlGetAttribute(node, "string")));
|
std::string(xmlGetAttribute(node, "string")));
|
||||||
node = node->xmlNextNode;
|
node = node->xmlNextNode;
|
||||||
}
|
}
|
||||||
#ifdef USE_ITEM_DESCRIPTION
|
|
||||||
while (xmlGetNextOccurence(node, "item") != NULL) {
|
while (xmlGetNextOccurence(node, "item") != NULL) {
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
e.item = std::string(xmlGetAttribute(node, "string"));
|
e.item = std::string(xmlGetAttribute(node, "string"));
|
||||||
|
#endif
|
||||||
node = node->xmlNextNode;
|
node = node->xmlNextNode;
|
||||||
}
|
}
|
||||||
while (xmlGetNextOccurence(node, "item_description") != NULL) {
|
while (xmlGetNextOccurence(node, "item_description") != NULL) {
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
e.itemDescription = std::string(xmlGetAttribute(node, "string"));
|
e.itemDescription = std::string(xmlGetAttribute(node, "string"));
|
||||||
|
#endif
|
||||||
node = node->xmlNextNode;
|
node = node->xmlNextNode;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
while (xmlGetNextOccurence(node, "extended_text") != NULL) {
|
while (xmlGetNextOccurence(node, "extended_text") != NULL) {
|
||||||
e.appendExtendedText( std::string(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang"))),
|
e.appendExtendedText( std::string(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang"))),
|
||||||
std::string(xmlGetAttribute(node, "string")));
|
std::string(xmlGetAttribute(node, "string")));
|
||||||
|
Reference in New Issue
Block a user