[Commits] [SCM] claws branch, master, updated. 3.10.0-28-g2695955
ticho at claws-mail.org
ticho at claws-mail.org
Sat May 31 22:34:17 CEST 2014
The branch master of project "claws" (Claws Mail) has been updated
via 2695955e3b2700f7897d0aad71292fb811293cd3 (commit)
via 836015db5073fdc33f079264560fb6511ce5b392 (commit)
from 11654e733ec943c61fcd0db0ebf4b684b1556a22 (commit)
- Log -----------------------------------------------------------------
commit 2695955e3b2700f7897d0aad71292fb811293cd3
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Sat May 31 22:33:46 2014 +0200
Check for existence of xmlNode namespace, to prevent NULL pointer crashes.
diff --git a/src/plugins/rssyl/parsers.c b/src/plugins/rssyl/parsers.c
index 4f4c401..bc491ae 100644
--- a/src/plugins/rssyl/parsers.c
+++ b/src/plugins/rssyl/parsers.c
@@ -101,8 +101,8 @@ gint rssyl_parse_rdf(xmlDocPtr doc, RSSylFolderItem *ritem, gchar *parent)
}
/* Date - ISO8701 format */
if( !xmlStrcmp(n->name, "date") &&
- (!xmlStrcmp(n->ns->prefix, "ns")
- || !xmlStrcmp(n->ns->prefix, "dc")) ) {
+ (n->ns && n->ns->prefix && (!xmlStrcmp(n->ns->prefix, "ns")
+ || !xmlStrcmp(n->ns->prefix, "dc"))) ) {
content = xmlNodeGetContent(n);
fitem->date = parseISO8601Date(content);
xmlFree(content);
@@ -218,8 +218,8 @@ gint rssyl_parse_rss(xmlDocPtr doc, RSSylFolderItem *ritem, gchar *parent)
xmlFree(content);
}
}
- if( !xmlStrcmp(n->name, "encoded")
- && !xmlStrcmp(n->ns->prefix, "content") ) {
+ if( !xmlStrcmp(n->name, "encoded") &&
+ (n->ns && n->ns->prefix && !xmlStrcmp(n->ns->prefix, "content")) ) {
debug_print("RSSyl: XML - item text (content) caught\n");
if (fitem->text != NULL)
commit 836015db5073fdc33f079264560fb6511ce5b392
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Sat May 31 22:26:06 2014 +0200
When parsing RSS 2.0, ignore <link> tags with a namespace prefix.
diff --git a/src/plugins/rssyl/parsers.c b/src/plugins/rssyl/parsers.c
index 33b50ec..4f4c401 100644
--- a/src/plugins/rssyl/parsers.c
+++ b/src/plugins/rssyl/parsers.c
@@ -232,7 +232,8 @@ gint rssyl_parse_rss(xmlDocPtr doc, RSSylFolderItem *ritem, gchar *parent)
}
/* URL link to the original post */
- if( !xmlStrcmp(n->name, "link") ) {
+ if( !xmlStrcmp(n->name, "link") &&
+ (!n->ns || !n->ns->prefix || !strlen(n->ns->prefix)) ) {
content = xmlNodeGetContent(n);
fitem->link = rssyl_format_string(content, FALSE, TRUE);
xmlFree(content);
-----------------------------------------------------------------------
Summary of changes:
src/plugins/rssyl/parsers.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list