RSSyl: make sure we do not operate with NULL text in libfeed parsers' end-handlers.
authorAndrej Kacian <andrej@kacian.sk>
Sun, 29 Jun 2014 19:26:48 +0000 (21:26 +0200)
committerAndrej Kacian <andrej@kacian.sk>
Sun, 29 Jun 2014 19:26:48 +0000 (21:26 +0200)
src/plugins/rssyl/libfeed/parser_atom10.c
src/plugins/rssyl/libfeed/parser_rdf.c

index 59fba1c5c364780db1850ab7b53acc7234f6b1f6..2285477caa0a9485757d0e28d775aaa84d2a8c21 100644 (file)
@@ -93,6 +93,8 @@ void feed_parser_atom10_end(void *data, const gchar *el)
 
        if( ctx->str != NULL )
                text = ctx->str->str;
+       else
+               text = "";
 
        ctx->depth--;
 
index dc424c56e4c6279afe5a6f1c8a12c7dd1c4767d4..f469e060e4f5f3cda0909ebbab0f3b74e7d0e3f3 100644 (file)
@@ -56,6 +56,8 @@ void feed_parser_rdf_end(void *data, const gchar *el)
 
        if( ctx->str != NULL )
                text = ctx->str->str;
+       else
+               text = "";
 
        ctx->depth--;