+2007-08-30 [colin] 2.10.0cvs185
+
+ * src/compose.c
+ * src/folderview.c
+ * src/main.c
+ * src/prefs_matcher.c
+ * src/prefs_template.c
+ * src/quote_fmt.c
+ * src/send_message.c
+ * src/toolbar.c
+ * src/gtk/gtkaspell.c
+ * src/plugins/bogofilter/bogofilter.c
+ * src/plugins/bogofilter/bogofilter_gtk.c
+ * src/plugins/clamav/clamav_plugin_gtk.c
+ * src/plugins/pgpcore/sgpgme.c
+ * src/plugins/spamassassin/spamassassin.c
+ * src/plugins/spamassassin/spamassassin_gtk.c
+ Fix all potential misuses of format-string functions
+
2007-08-30 [wwp] 2.10.0cvs184
* src/prefs_template.c
( cvs diff -u -r 1.274.2.207 -r 1.274.2.208 src/mainwindow.c; ) > 2.10.0cvs182.patchset
( cvs diff -u -r 1.14.2.58 -r 1.14.2.59 src/plugins/trayicon/trayicon.c; ) > 2.10.0cvs183.patchset
( cvs diff -u -r 1.12.2.45 -r 1.12.2.46 src/prefs_template.c; ) > 2.10.0cvs184.patchset
+( cvs diff -u -r 1.382.2.404 -r 1.382.2.405 src/compose.c; cvs diff -u -r 1.207.2.178 -r 1.207.2.179 src/folderview.c; cvs diff -u -r 1.115.2.164 -r 1.115.2.165 src/main.c; cvs diff -u -r 1.43.2.61 -r 1.43.2.62 src/prefs_matcher.c; cvs diff -u -r 1.12.2.46 -r 1.12.2.47 src/prefs_template.c; cvs diff -u -r 1.8.2.22 -r 1.8.2.23 src/quote_fmt.c; cvs diff -u -r 1.17.2.42 -r 1.17.2.43 src/send_message.c; cvs diff -u -r 1.43.2.81 -r 1.43.2.82 src/toolbar.c; cvs diff -u -r 1.9.2.53 -r 1.9.2.54 src/gtk/gtkaspell.c; cvs diff -u -r 1.1.2.33 -r 1.1.2.34 src/plugins/bogofilter/bogofilter.c; cvs diff -u -r 1.1.2.25 -r 1.1.2.26 src/plugins/bogofilter/bogofilter_gtk.c; cvs diff -u -r 1.9.2.26 -r 1.9.2.27 src/plugins/clamav/clamav_plugin_gtk.c; cvs diff -u -r 1.1.2.47 -r 1.1.2.48 src/plugins/pgpcore/sgpgme.c; cvs diff -u -r 1.18.2.55 -r 1.18.2.56 src/plugins/spamassassin/spamassassin.c; cvs diff -u -r 1.23.2.40 -r 1.23.2.41 src/plugins/spamassassin/spamassassin_gtk.c; ) > 2.10.0cvs185.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=184
+EXTRA_VERSION=185
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
buf = quote_fmt_get_buffer();
if (buf == NULL) {
gint line = quote_fmt_get_line();
- gchar *msg = g_strdup_printf(err_msg, line);
- alertpanel_error(msg);
- g_free(msg);
+ alertpanel_error(err_msg, line);
goto error;
}
} else
}
} else {
if (errstr) {
- gchar *tmp = g_strdup_printf(_("%s\nUse \"Send queued messages\" from "
+ alertpanel_error_log(_("%s\nUse \"Send queued messages\" from "
"the main window to retry."), errstr);
g_free(errstr);
- alertpanel_error_log(tmp);
- g_free(tmp);
} else {
alertpanel_error_log(_("The message was queued but could not be "
"sent.\nUse \"Send queued messages\" from "
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE);
if (warn && !found && strlen(compose->privacy_system)) {
- gchar *tmp = g_strdup_printf(
- _("The privacy system '%s' cannot be loaded. You "
+ alertpanel_warning(_("The privacy system '%s' cannot be loaded. You "
"will not be able to sign or encrypt this message."),
compose->privacy_system);
- alertpanel_warning(tmp);
- g_free(tmp);
}
}
alertpanel_error_log(_("Some errors occurred while "
"sending queued messages."));
else {
- gchar *tmp = g_strdup_printf(_("Some errors occurred "
+ alertpanel_error_log(_("Some errors occurred "
"while sending queued messages:\n%s"), errstr);
g_free(errstr);
- alertpanel_error_log(tmp);
- g_free(tmp);
}
}
}
gtkaspeller = gtkaspeller_new(dict);
if (!gtkaspeller) {
- gchar *message;
- message = g_strdup_printf(_("The spell checker could not change dictionary.\n%s"),
+ alertpanel_warning(_("The spell checker could not change dictionary.\n%s"),
gtkaspellcheckers->error_message);
-
- alertpanel_warning(message);
- g_free(message);
} else {
if (gtkaspell->use_alternate) {
if (gtkaspell->alternate_speller) {
gtkaspeller = gtkaspeller_new(dict);
if (!gtkaspeller) {
- gchar *message;
- message = g_strdup_printf(_("The spell checker could not change the alternate dictionary.\n%s"),
+ alertpanel_warning(_("The spell checker could not change the alternate dictionary.\n%s"),
gtkaspellcheckers->error_message);
-
- alertpanel_warning(message);
- g_free(message);
} else {
if (gtkaspell->alternate_speller)
gtkaspeller_delete(gtkaspell->alternate_speller);
}
}
if (errstr) {
- gchar *tmp = g_strdup_printf(_("Some errors occurred "
+ alertpanel_error_log(_("Some errors occurred "
"while sending queued messages:\n%s"), errstr);
g_free(errstr);
- alertpanel_error_log(tmp);
- g_free(tmp);
} else if (error) {
alertpanel_error_log("Some errors occurred "
"while sending queued messages.");
bogo_args[0], bogo_args[1], bogo_args[2]);
if (!prefs_common.no_recv_err_panel) {
if (!warned_error) {
- alertpanel_error(msg);
+ alertpanel_error("%s", msg);
}
warned_error = TRUE;
} else {
- gchar *tmp = g_strdup_printf("%s\n", msg);
- log_error(LOG_PROTOCOL, tmp);
- g_free(tmp);
+ log_error(LOG_PROTOCOL, "%s\n", msg);
}
g_free(msg);
}
BogoCbData *cbdata = (BogoCbData *)data;
if (cbdata->message)
- statusbar_print_all(cbdata->message);
+ statusbar_print_all("%s", cbdata->message);
else if (cbdata->total == 0) {
statusbar_pop_all();
}
static void gtk_message_callback(gchar *message)
{
- statusbar_print_all(message);
+ statusbar_print_all("%s", message);
}
gint clamav_gtk_init(void)
if ((err = gpgme_op_verify(ctx, sig, plain, dummy)) != GPG_ERR_NO_ERROR) {
debug_print("op_verify err %s\n", gpgme_strerror(err));
- privacy_set_error(gpgme_strerror(err));
+ privacy_set_error("%s", gpgme_strerror(err));
return GINT_TO_POINTER(-GPG_ERR_SYSTEM_ERROR);
}
"sure spamd is running and accessible.");
if (!prefs_common.no_recv_err_panel) {
if (!warned_error) {
- alertpanel_error(msg);
+ alertpanel_error("%s", msg);
}
warned_error = TRUE;
} else {
- gchar *tmp = g_strdup_printf("%s\n", msg);
- log_error(LOG_PROTOCOL, tmp);
- g_free(tmp);
+ log_error(LOG_PROTOCOL, "%s\n", msg);
}
}
static void gtk_message_callback(gchar *message)
{
- statusbar_print_all(message);
+ statusbar_print_all("%s", message);
}
static struct SpamAssassinPage spamassassin_page;
return NULL;
}
if (*expr == '\0') {
- gchar *msg;
gchar *tmp;
if (strcasecmp(header, Q_("Filtering Matcher Menu|All")) == 0)
tmp = g_strdup(_("any address in any header"));
else
tmp = g_strdup_printf(_("the address(es) in header '%s'"), header);
- msg = g_strdup_printf(_("Book/folder path is not set.\n\n"
+ alertpanel_error(_("Book/folder path is not set.\n\n"
"If you want to match %s against the whole address book, "
"you have to select 'Any' from the book/folder drop-down list."),
tmp);
- alertpanel_error(msg);
- g_free(msg);
g_free(tmp);
return NULL;
}
value = NULL;
}
if (!prefs_template_string_is_valid(value, &line)) {
- gchar *msg;
-
- msg = g_strdup_printf(_("Template body format error at line %d."), line);
- alertpanel_error(msg);
- g_free(msg);
+ alertpanel_error(_("Template body format error at line %d."), line);
g_free(value);
return FALSE;
}
alertpanel_error(_("New message subject format error."));
if (!prefs_template_string_is_valid(body_fmt, &line)) {
- gchar *msg = g_strdup_printf(_("New message body format error at line %d."), line);
- alertpanel_error(msg);
- g_free(msg);
+ alertpanel_error(_("New message body format error at line %d."), line);
}
}
}
alertpanel_error(_("Message reply quotation mark format error."));
if (!prefs_template_string_is_valid(body_fmt, &line)) {
- gchar *msg = g_strdup_printf(_("Message reply format error at line %d."), line);
- alertpanel_error(msg);
- g_free(msg);
+ alertpanel_error(_("Message reply format error at line %d."), line);
}
}
}
alertpanel_error(_("Message forward quotation mark format error."));
if (!prefs_template_string_is_valid(body_fmt, &line)) {
- gchar *msg = g_strdup_printf(_("Message forward format error at line %d."), line);
- alertpanel_error(msg);
- g_free(msg);
+ alertpanel_error(_("Message forward format error at line %d."), line);
}
}
}
&& (ac_prefs->protocol == A_APOP || ac_prefs->protocol == A_POP3)
&& (time(NULL) - ac_prefs->last_pop_login_time) > (60 * ac_prefs->pop_before_smtp_timeout)) {
g_snprintf(buf, sizeof(buf), _("Doing POP before SMTP..."));
- log_message(LOG_PROTOCOL, buf);
+ log_message(LOG_PROTOCOL, "%s\n", buf);
progress_dialog_set_label(dialog->dialog, buf);
progress_dialog_list_set_status(dialog->dialog, 0, _("POP before SMTP"));
GTK_EVENTS_FLUSH();
alertpanel_error_log(_("Some errors occurred while "
"sending queued messages."));
else {
- gchar *tmp = g_strdup_printf(_("Some errors occurred "
+ alertpanel_error_log(_("Some errors occurred "
"while sending queued messages:\n%s"), errstr);
g_free(errstr);
- alertpanel_error_log(tmp);
- g_free(tmp);
}
}
}