[Commits] [SCM] claws branch, master, updated. 3.11.0-8-gf9816dd
mones at claws-mail.org
mones at claws-mail.org
Thu Oct 23 10:03:04 CEST 2014
The branch, master has been updated
via f9816ddf416fb29d199d57a53a87c932e5dc9895 (commit)
from 86c33788de5d398c63d646f0fe02e205ea37683e (commit)
Summary of changes:
src/plugins/rssyl/rssyl_update_feed.c | 31 ++++++++++++++++++++++---------
1 file changed, 22 insertions(+), 9 deletions(-)
- Log -----------------------------------------------------------------
commit f9816ddf416fb29d199d57a53a87c932e5dc9895
Author: Ricardo Mones <ricardo at mones.org>
Date: Thu Oct 23 09:56:19 2014 +0200
Free newly created strings from g_markup_printf_escaped
Fixes also build with hardening flags:
• rssyl_update_feed.c:124:6: error: format not a string literal and no
format arguments [-Werror=format-security]
• rssyl_update_feed.c:135:8: error: format not a string literal and no
format arguments [-Werror=format-security]
• rssyl_update_feed.c:222:6: error: format not a string literal and no
format arguments [-Werror=format-security]
diff --git a/src/plugins/rssyl/rssyl_update_feed.c b/src/plugins/rssyl/rssyl_update_feed.c
index 7f032fa..63b0c6f 100644
--- a/src/plugins/rssyl/rssyl_update_feed.c
+++ b/src/plugins/rssyl/rssyl_update_feed.c
@@ -118,10 +118,14 @@ void rssyl_fetch_feed(RFetchCtx *ctx, gboolean verbose)
if( ctx->error != NULL ) {
/* libcurl wasn't happy */
debug_print("RSSyl: Error: %s\n", ctx->error);
- if( verbose )
- alertpanel_error(g_markup_printf_escaped(C_("First parameter is URL, second is error text",
+ if( verbose ) {
+ gchar *msg = g_markup_printf_escaped(
+ (const char *) C_("First parameter is URL, second is error text",
"Error fetching feed at\n<b>%s</b>:\n\n%s"),
- feed_get_url(ctx->feed), ctx->error));
+ feed_get_url(ctx->feed), ctx->error);
+ alertpanel_error("%s", msg);
+ g_free(msg);
+ }
log_error(LOG_PROTOCOL, RSSYL_LOG_ERROR_FETCH, ctx->feed->url, ctx->error);
@@ -130,9 +134,13 @@ void rssyl_fetch_feed(RFetchCtx *ctx, gboolean verbose)
if( feed_get_title(ctx->feed) == NULL ) {
/* libcurl was happy, but libfeed wasn't */
debug_print("RSSyl: Error reading feed\n");
- if( verbose )
- alertpanel_error(g_markup_printf_escaped(_("No valid feed found at\n<b>%s</b>"),
- feed_get_url(ctx->feed)));
+ if( verbose ) {
+ gchar *msg = g_markup_printf_escaped(
+ (const char *) _("No valid feed found at\n<b>%s</b>"),
+ feed_get_url(ctx->feed));
+ alertpanel_error("%s", msg);
+ g_free(msg);
+ }
log_error(LOG_PROTOCOL, RSSYL_LOG_ERROR_NOFEED,
feed_get_url(ctx->feed));
@@ -217,9 +225,14 @@ gboolean rssyl_update_feed(RFolderItem *ritem, gboolean verbose)
if( ctx->success && !(ctx->success = rssyl_parse_feed(ritem, ctx->feed)) ) {
/* both libcurl and libfeed were happy, but we weren't */
debug_print("RSSyl: Error processing feed\n");
- if( verbose )
- alertpanel_error(g_markup_printf_escaped(_("Couldn't process feed at\n<b>%s</b>\n\nPlease contact developers, this should not happen."),
- feed_get_url(ctx->feed)));
+ if( verbose ) {
+ gchar *msg = g_markup_printf_escaped(
+ (const char *) _("Couldn't process feed at\n<b>%s</b>\n\n"
+ "Please contact developers, this should not happen."),
+ feed_get_url(ctx->feed));
+ alertpanel_error("%s", msg);
+ g_free(msg);
+ }
log_error(LOG_PROTOCOL, RSSYL_LOG_ERROR_PROC, ctx->feed->url);
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list