Commit 96fbf81e authored by Bastien Nocera's avatar Bastien Nocera

podcasts: Fix crash trying to parse unsupported format

1. Add an Atom feed to the Podcasts plugin
2. Try to browse that Atom feed
3. RSS parser crashes as it doesn't know how to parse Atom

==8560== Invalid read of size 8
==8560==    at 0x1BBD36DF: parse_feed (grl-podcasts.c:1274)
==8560==    by 0x1BBD36DF: read_feed_cb (grl-podcasts.c:1365)
==8560==    by 0x1BBD1272: read_done_cb (grl-podcasts.c:494)
==8560==    by 0x52F1A69: g_simple_async_result_complete (in /usr/lib64/libgio-2.0.so.0.5800.3)
==8560==    by 0x1BB48D2F: read_async_cb (grl-net-wc.c:619)
==8560==  Address 0x10 is not stack'd, malloc'd or (recently) free'd
parent 9e8315e4
Pipeline #58357 failed with stage
in 9 minutes and 46 seconds
......@@ -1269,6 +1269,13 @@ parse_feed (OperationSpec *os, const gchar *str, GError **error)
xmlXPathFreeObject (xpathObj);
xpathObj = NULL;
if(podcast_data == NULL) {
*error = g_error_new_literal (GRL_CORE_ERROR,
os->error_code,
_("Failed to parse podcast contents"));
goto free_resources;
}
/* Check podcast pubDate (if available), if it has not been updated
recently then we can use the cache and avoid parsing the feed */
if (podcast_data->published != NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment