Commit af8a716d authored by Jeremy Bicha's avatar Jeremy Bicha

New upstream version 2.5.6

parents 1b7f3c28 61886d24
2018-06-01 Pawel Salek <pawsa0@gmail.com>
* NEWS, configure.ac: release balsa-2.5.6
* src/Makefile.am: add missing xml files
2018-06-01 Pawel Salek <pawsa0@gmail.com>
* src/balsa-icons.c: don't let missing icons stop balsa.
2018-05-31 Peter Bloomfield <pbloomfield@bellsouth.net>
Use g_strcmp0() for NULL-safe comparisons
* libbalsa/address-book-rubrica.c (extract_net):
* libbalsa/gmime-gpgme-signature.c
(libbalsa_cert_subject_readable):
* libbalsa/html.c (lbh_mouse_target_changed_cb),
(libbalsa_html_search):
* libbalsa/identity.c (libbalsa_identity_combo_box):
* libbalsa/mailbox.c (libbalsa_mailbox_set_identity_name),
(lbm_try_reassemble):
* libbalsa/mailbox_mbox.c (lbm_mbox_message_new):
* libbalsa/smtp-server.c (smtp_server_compare):
* src/ab-main.c (bab_config_init):
* src/balsa-app.c (find_path), (balsa_quote_regex_new):
* src/balsa-icons.c (load_balsa_pixmap):
* src/filter-edit-callbacks.c (change_filter_name):
* src/folder-conf.c (subfolder_conf_clicked_ok),
(folder_conf_imap_sub_node):
* src/mailbox-node.c (remove_special_mailbox_by_url):
* src/pref-manager.c (open_preferences_manager_idle):
* src/save-restore.c (config_address_book_load):
* src/sendmsg-window.c (sw_preferred_charset),
(find_locale_index_by_locale), (has_file_attached):
2018-05-31 Peter Bloomfield <pbloomfield@bellsouth.net>
* src/filter-edit-callbacks.c (fe_new_pressed): Do not leak
new_item.
2018-05-31 Peter Bloomfield <pbloomfield@bellsouth.net>
* src/balsa-index.c (bndx_pipe_queue_last): Do not leak
PipeData.
2018-05-31 Peter Bloomfield <pbloomfield@bellsouth.net>
* libbalsa/mailbox_imap.c (libbalsa_mailbox_imap_get_matchings):
Do not leak ImapSearchData.
2018-05-31 Peter Bloomfield <pbloomfield@bellsouth.net>
* libbalsa/imap/imap-handle.c (ir_body_type_1part): Do not leak
ImapEnvelope.
2018-05-31 Albrecht Dreß <albrecht.dress@arcor.de>
Mitigate EFail vulnerability for Webkit2
* libbalsa/html.c (lbh_navigation_policy_decision): ignore all
decisions except WEBKIT_NAVIGATION_TYPE_LINK_CLICKED;
(libbalsa_html_new): disable Java and JavaScript.
2018-05-31 Peter Bloomfield <pbloomfield@bellsouth.net>
* src/balsa-index.c (bndx_compose_foreach): Count skipped
messages only when replying to group.
2018-05-30 Peter Bloomfield <pbloomfield@bellsouth.net>
* src/balsa-index.c (bndx_compose_foreach): When replying to
group, count how many messages were skipped for not having the
"list-post" header, and report them.
2018-05-30 Peter Bloomfield <pbloomfield@bellsouth.net>
* src/message-window.c (message_window_new): Disable "reply to
group" when the message is not from an RFC-2369-compliant
mailing list.
<URL:https://tools.ietf.org/html/rfc2369>
2018-05-29 Peter Bloomfield <pbloomfield@bellsouth.net>
* src/balsa-index.c (bndx_selection_changed): Emit
"index-changed" even if the preview does not need to be updated,
so that the main window menus can be enabled/disabled
appropriately.
2018-05-29 Peter Bloomfield <pbloomfield@bellsouth.net>
* src/sendmsg-window.c (sendmsg_window_reply): If the message is
a reply to a mailing list, check that the message we are
replying to actually came from a mailing list; if not, return
NULL.
2018-05-29 Peter Bloomfield <pbloomfield@bellsouth.net>
* src/main-window.c (bw_enable_message_menus): Disable "reply to
group" when the message is not from an RFC-2369-compliant mail list.
<URL:https://tools.ietf.org/html/rfc2369>
2018-05-10 Peter Bloomfield <pbloomfield@bellsouth.net>
New files for migrating to GResource
* ui/balsa-ab.gresource.xml:
* ui/balsa.gresource.xml:
2018-05-01 Albrecht Dreß <albrecht.dress@arcor.de>
Display time stamps of date-only RFC 5545 iCalendar events
I noticed that “VALUE=DATE” time stamps (date only, without time) in RFC 5545 iCalendar parts (MIME type text/calendar) are not displayed.
The attached trivial patch add parsing, displaying and printing such values As to simplify life, the date-only values are printed using the “%x” conversion specification, instead of extracting the date part from balsa_app.date_string.
* libbalsa/rfc2445.c (libbalsa_vcal_new_from_body),
(date_time_2445_to_time_t):
* libbalsa/rfc2445.h:
* src/balsa-mime-widget-vcalendar.c (balsa_vevent_widget):
* src/balsa-print-object-text.c (balsa_print_object_text_calendar):
2018-04-11 Peter Bloomfield <pbloomfield@bellsouth.net>
Fix the "scroll on click" issue
(https://bugzilla.gnome.org/show_bug.cgi?id=795085)
* src/balsa-message.c (balsa_message_init): wrap the
BalsaMimeWidget::widget in a GtkViewport; if we do not,
GtkContainer does it for us, but also sets it up to scroll when
first clicked, which leaves the wrong text under the pointer.
2018-03-19 Peter Bloomfield <pbloomfield@bellsouth.net>
* libbalsa/imap/imap-commands.c (imap_mbox_handle_fetch_body):
silence a gcc gripe about snprintf.
2018-03-19 Peter Bloomfield <pbloomfield@bellsouth.net>
* libbalsa/imap/imap-commands.c (imap_mbox_handle_fetch_body):
silence a gcc gripe about strncpy.
2018-02-27 Pawel Salek <pawsa0@gmail.com>
* src/main-window.c: update a date.
......
......@@ -288,6 +288,7 @@ GCR_CFLAGS = @GCR_CFLAGS@
GCR_LIBS = @GCR_LIBS@
GENHTML = @GENHTML@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
* Balsa-2.5.6 release. Release date 2018-06-01
Changes wrt to 2.5.5 tag:
- fix scroll on click issue
- display time stamps of date-only RFC 5545 iCalendar events
- disable reply-to-group when the message is not from an
RFC-2369-compliant mail list
- Mitigate EFail vulnerability for Webkit2
* Balsa-2.5.5 release. Release date 2018-02-26
Changes wrt to 2.5.4 tag:
......
......@@ -10,7 +10,7 @@
%endif
Name: balsa
Version: 2.5.5
Version: 2.5.6
Release: 1
Summary: Mail Client
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for balsa 2.5.5.
# Generated by GNU Autoconf 2.69 for balsa 2.5.6.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
......@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='balsa'
PACKAGE_TARNAME='balsa'
PACKAGE_VERSION='2.5.5'
PACKAGE_STRING='balsa 2.5.5'
PACKAGE_VERSION='2.5.6'
PACKAGE_STRING='balsa 2.5.6'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
......@@ -739,6 +739,7 @@ YELP_LC_DIST
YELP_LC_MEDIA_LINKS
HAVE_YELPTOOL_FALSE
HAVE_YELPTOOL_TRUE
GLIB_COMPILE_RESOURCES
PKG_CONFIG
LT_SYS_LIBRARY_PATH
OTOOL64
......@@ -1483,7 +1484,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures balsa 2.5.5 to adapt to many kinds of systems.
\`configure' configures balsa 2.5.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1554,7 +1555,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of balsa 2.5.5:";;
short | recursive ) echo "Configuration of balsa 2.5.6:";;
esac
cat <<\_ACEOF
......@@ -1752,7 +1753,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
balsa configure 2.5.5
balsa configure 2.5.6
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2220,7 +2221,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by balsa $as_me 2.5.5, which was
It was created by balsa $as_me 2.5.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3084,7 +3085,7 @@ fi
# Define the identity of the package.
PACKAGE='balsa'
VERSION='2.5.5'
VERSION='2.5.6'
cat >>confdefs.h <<_ACEOF
......@@ -3231,7 +3232,7 @@ ac_config_headers="$ac_config_headers config.h"
cat >>confdefs.h <<_ACEOF
#define BALSA_VERSION "2.5.5"
#define BALSA_VERSION "2.5.6"
_ACEOF
......@@ -13615,6 +13616,49 @@ fi
# glib-compile-resources
#
# Extract the first word of "glib-compile-resources", so it can be a program name with args.
set dummy glib-compile-resources; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GLIB_COMPILE_RESOURCES+:} false; then :
$as_echo_n "(cached) " >&6
else
case $GLIB_COMPILE_RESOURCES in
[\\/]* | ?:[\\/]*)
ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
if test -n "$GLIB_COMPILE_RESOURCES"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
$as_echo "$GLIB_COMPILE_RESOURCES" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
# yelp
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Yelp tool" >&5
......@@ -19807,7 +19851,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by balsa $as_me 2.5.5, which was
This file was extended by balsa $as_me 2.5.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -19873,7 +19917,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
balsa config.status 2.5.5
balsa config.status 2.5.6
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -8,9 +8,9 @@ dnl ###########################################################################
dnl Boilerplace and versioning
dnl ###########################################################################
# if autoconf is used not in a git source tree, use version=2.5.5
# if autoconf is used not in a git source tree, use version=2.5.6
AC_INIT([balsa],
m4_esyscmd([test -d .git && echo -n `git describe --tags` || echo -n 2.5.5]),
m4_esyscmd([test -d .git && echo -n `git describe --tags` || echo -n 2.5.6]),
[])
AM_INIT_AUTOMAKE
......@@ -167,6 +167,10 @@ AC_CHECK_MEMBERS([struct utsname.domainname],[],[],[[#include<sys/utsname.h>]])
#
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
# glib-compile-resources
#
AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
# yelp
#
AC_MSG_CHECKING([for Yelp tool])
......
2018-02-27 Peter Bloomfield <pbloomfield@bellsouth.net>
* es/es.po: fix XML tags
2017-11-08 Peter Bloomfield <pbloomfield@bellsouth.net>
* de/de.po: fix XML tags
......
......@@ -165,6 +165,7 @@ GCR_CFLAGS = @GCR_CFLAGS@
GCR_LIBS = @GCR_LIBS@
GENHTML = @GENHTML@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
......@@ -70,18 +70,9 @@
<p>Los siguientes programas son compatibles con el lector de correos mutt y <em>deberían</em> serlo con Balsa. Envíe enlaces a más programas.</p>
<list>
<item><p>
<link href="http://www.spinnaker.de/lbdb/" type="http">http://www.spinnaker.de/lbdb/</link> - The little
brother database. Read emailaddresses and names from: finger,
/etc/passwd, incoming procmail email, NIS, fido, the abook program,
mutt addressbook, pine addressbook, palm addressbook, gnomecard
addressbook, big brother database, ldap database.
</p></item>
<item><p>
<link href="http://www.fiction.net/blong/programs/mutt/">http://www.fiction.net/blong/programs/mutt/</link>
- palm address database, ldapsearch wrapper, ph/qi server, UIUC, ph,
</p></item>
<item><p><link href="http://www.spinnaker.de/lbdb/" type="http">http://www.spinnaker.de/lbdb/</link>: la base de datos Little Brother. Lee direcciones de correo y nombres de: finger, /etc/passwd, email procmail entrante, NIS, fido, el programa abook, libreta de direcciones mutt, libreta de direcciones pine, libreta de direcciones palm, libreta de direcciones gnomecard, base de datos big brother, base de datos ldap.</p></item>
<item><p><link href="http://www.fiction.net/blong/programs/mutt/">http://www.fiction.net/blong/programs/mutt/</link>: base de datos de direcciones palm, contenedor ldapsearch, servidor ph/qi, UIUC, ph.</p></item>
</list>
</section>
......
......@@ -94,7 +94,7 @@ msgid ""
"gnomecard addressbook, big brother database, ldap database."
msgstr ""
"<link href=\"http://www.spinnaker.de/lbdb/\" type=\"http\">http://www."
"spinnaker.de/lbdb/</ulink>: la base de datos Little Brother. Lee direcciones "
"spinnaker.de/lbdb/</link>: la base de datos Little Brother. Lee direcciones "
"de correo y nombres de: finger, /etc/passwd, email procmail entrante, NIS, "
"fido, el programa abook, libreta de direcciones mutt, libreta de direcciones "
"pine, libreta de direcciones palm, libreta de direcciones gnomecard, base de "
......@@ -108,7 +108,7 @@ msgid ""
"wrapper, ph/qi server, UIUC, ph,"
msgstr ""
"<link href=\"http://www.fiction.net/blong/programs/mutt/\">http://www."
"fiction.net/blong/programs/mutt/</ulink>: base de datos de direcciones palm, "
"fiction.net/blong/programs/mutt/</link>: base de datos de direcciones palm, "
"contenedor ldapsearch, servidor ph/qi, UIUC, ph."
#. (itstool) path: section/title
......
......@@ -195,6 +195,7 @@ GCR_CFLAGS = @GCR_CFLAGS@
GCR_LIBS = @GCR_LIBS@
GENHTML = @GENHTML@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
......@@ -195,6 +195,7 @@ GCR_CFLAGS = @GCR_CFLAGS@
GCR_LIBS = @GCR_LIBS@
GENHTML = @GENHTML@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
......@@ -255,6 +255,7 @@ GCR_CFLAGS = @GCR_CFLAGS@
GCR_LIBS = @GCR_LIBS@
GENHTML = @GENHTML@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
......@@ -195,6 +195,7 @@ GCR_CFLAGS = @GCR_CFLAGS@
GCR_LIBS = @GCR_LIBS@
GENHTML = @GENHTML@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
......@@ -331,6 +331,7 @@ GCR_CFLAGS = @GCR_CFLAGS@
GCR_LIBS = @GCR_LIBS@
GENHTML = @GENHTML@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
......@@ -682,9 +682,9 @@ extract_net(xmlNodePtr entry, GList ** mail_addrs)
gchar *mail_addr;
if (!xmlStrcmp(entry->name, CXMLCHARP("Uri"))
&& (uri_type = xml_node_get_attr(entry, CXMLCHARP("type")))
&& !strcmp(uri_type, "email")
&& (mail_addr = xml_node_get_text(entry)))
&& g_strcmp0(uri_type = xml_node_get_attr(entry, CXMLCHARP("type")),
"email") == 0
&& (mail_addr = xml_node_get_text(entry) != NULL))
*mail_addrs = g_list_prepend(*mail_addrs, mail_addr);
g_free(uri_type);
......
......@@ -145,22 +145,22 @@ get_accel_group(GMenuModel * model,
* Construct a menu-bar for a GtkApplicationWindow that does not use the
* GApplication's menubar
*
* window the GtkApplicationWindow
* entries array of GActionEntry structures
* n_entries length of the array
* ui_file filename for GtkBuilder input defining a menu named
* "menubar"
* error GError for returning error information
* cb_data user data for GAction callbacks
* window the GtkApplicationWindow
* entries array of GActionEntry structures
* n_entries length of the array
* resource_path resource path for GtkBuilder input defining a menu named
* "menubar"
* error GError for returning error information
* cb_data user data for GAction callbacks
*
* returns: the GtkMenuBar
* returns: the GtkMenuBar
*/
GtkWidget *
libbalsa_window_get_menu_bar(GtkApplicationWindow * window,
const GActionEntry * entries,
gint n_entries,
const gchar * ui_file,
const gchar * resource_path,
GError ** error,
gpointer cb_data)
{
......@@ -171,7 +171,7 @@ libbalsa_window_get_menu_bar(GtkApplicationWindow * window,
g_action_map_add_action_entries(map, entries, n_entries, cb_data);
builder = gtk_builder_new();
if (gtk_builder_add_from_file(builder, ui_file, error)) {
if (gtk_builder_add_from_resource(builder, resource_path, error)) {
GMenuModel *menu_model;
menu_model =
......
......@@ -34,7 +34,7 @@
GtkWidget *libbalsa_window_get_menu_bar(GtkApplicationWindow * window,
const GActionEntry * entries,
gint n_entries,
const gchar * ui_file,
const gchar * resource_path,
GError ** error,
gpointer cb_data);
......
......@@ -268,9 +268,9 @@ libbalsa_cert_subject_readable(const gchar *subject)
if (equals) {
*equals++ = '\0';
for (ldap_elem = ldap_id_list;
ldap_elem->ldap_id && strcmp(ldap_elem->ldap_id, elements[n]);
g_strcmp0(ldap_elem->ldap_id, elements[n]) != 0;
ldap_elem++);
if (ldap_elem->ldap_id)
if (ldap_elem->ldap_id != NULL)
result = g_string_append(result, ldap_elem->readable);
else
result = g_string_append(result, elements[n]);
......
......@@ -236,18 +236,17 @@ lbh_mouse_target_changed_cb(WebKitWebView * web_view,
uri = webkit_hit_test_result_get_link_uri(hit_test_result);
if ((!uri && !info->uri)
|| (uri && info->uri && !strcmp(uri, info->uri)))
if (g_strcmp0(uri, info->uri) == 0)
/* No change */
return;
if (info->uri) {
if (info->uri != NULL) {
g_free(info->uri);
info->uri = NULL;
(*info->hover_cb) (NULL);
}
if (uri) {
if (uri != NULL) {
info->uri = g_strdup(uri);
(*info->hover_cb) (uri);
}
......@@ -280,17 +279,11 @@ lbh_navigation_policy_decision(WebKitPolicyDecision * decision,
uri = webkit_uri_request_get_uri(request);
switch (navigation_type) {
case WEBKIT_NAVIGATION_TYPE_OTHER:
case WEBKIT_NAVIGATION_TYPE_RELOAD:
d(g_print("%s uri %s, type %d, used\n", __func__, uri,
navigation_type));
webkit_policy_decision_use(decision);
break;
case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED:
d(g_print("%s clicked %s\n", __func__, uri));
(*info->clicked_cb) (uri);
default:
d(g_print("%s type %d, ignored\n", __func__, navigation_type));
d(g_print("%s uri %s, type %d, ignored\n", __func__, uri, navigation_type));
webkit_policy_decision_ignore(decision);
}
}
......@@ -628,6 +621,9 @@ libbalsa_html_new(LibBalsaMessageBody * body,
settings = webkit_web_view_get_settings(web_view);
webkit_settings_set_enable_plugins(settings, FALSE);
webkit_settings_set_enable_javascript(settings, FALSE);
webkit_settings_set_enable_java(settings, FALSE);
webkit_settings_set_enable_hyperlink_auditing(settings, TRUE);
webkit_settings_set_auto_load_images
(settings,
g_regex_match_simple(cid_regex, text, G_REGEX_CASELESS, 0));
......@@ -893,7 +889,7 @@ libbalsa_html_search(GtkWidget * widget,
info = g_object_get_data(G_OBJECT(web_view), LIBBALSA_HTML_INFO);
controller = webkit_web_view_get_find_controller(web_view);
if (!info->search_text || strcmp(text, info->search_text)) {
if (g_strcmp0(text, info->search_text) != 0) {
lbh_search_init(info, controller, text, find_forward, wrap,
search_cb, cb_data);
} else {
......
......@@ -2288,7 +2288,7 @@ libbalsa_identity_combo_box(GList * identities,
g_free(from);
g_free(name);
if (active_name != NULL && strcmp(active_name, ident->identity_name) == 0)
if (g_strcmp0(active_name, ident->identity_name) == 0)
gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo_box), &iter);
}
g_object_unref(store);
......
......@@ -233,6 +233,7 @@ GCR_CFLAGS = @GCR_CFLAGS@
GCR_LIBS = @GCR_LIBS@
GENHTML = @GENHTML@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
......@@ -1395,7 +1395,7 @@ imap_mbox_handle_fetch_body(ImapMboxHandle* handle,
ImapFetchBodyOptions options,
ImapFetchBodyCb body_cb, void *arg)
{
char cmd[160];
char cmd[200];
ImapFetchBodyInternalCb fcb;
void *farg;
ImapResponse rc;
......@@ -1445,7 +1445,7 @@ imap_mbox_handle_fetch_body(ImapMboxHandle* handle,
/* We have to strip last section part and replace it with HEADER */
unsigned sz;
char *last_dot = strrchr(section, '.');
strncpy(prefix, section, sizeof(prefix));
strncpy(prefix, section, sizeof(prefix) - 1);
if(last_dot) {
sz = last_dot-section+1;
......
......@@ -3977,7 +3977,11 @@ ir_body_type_1part (struct siobuf *sio, ImapBody * body,
rc = ir_envelope (sio, env);
#if GMAIL_BUG_20100725
if (rc == IMR_PARSE)
{
if (env)
imap_envelope_free (env);
break;
}
#endif /* GMAIL_BUG_20100725 */
if (rc != IMR_OK)
{
......@@ -3986,14 +3990,22 @@ ir_body_type_1part (struct siobuf *sio, ImapBody * body,
return rc;
}
if (sio_getc (sio) != ' ')
return IMR_PROTOCOL;
{
if (env)
imap_envelope_free (env);
return IMR_PROTOCOL;
}
if (body)
{
b = imap_body_new ();
body->envelope = env;
}
else
b = NULL;
{
b = NULL;
if (env)
imap_envelope_free (env);
}
rc = ir_body (sio, sio_getc (sio), b, type);
if (body)
imap_body_append_child (body, b);
......
......@@ -2351,7 +2351,7 @@ libbalsa_mailbox_set_identity_name(LibBalsaMailbox * mailbox,
{
LibBalsaMailboxView *view = lbm_get_view(mailbox);
if (!view->identity_name || strcmp(view->identity_name, identity_name)) {
if (g_strcmp0(view->identity_name, identity_name) != 0) {
g_free(view->identity_name);
view->identity_name = g_strdup(identity_name);
if (mailbox)
......@@ -4008,8 +4008,7 @@ lbm_try_reassemble(LibBalsaMailbox * mailbox, const gchar * id)
g_mime_multipart_foreach((GMimeMultipart *)
mime_message->mime_part,
lbm_try_reassemble_func, &partial);
if (partial
&& strcmp(g_mime_message_partial_get_id(partial), id) == 0) {
if (g_strcmp0(g_mime_message_partial_get_id(partial), id) == 0) {
g_ptr_array_add(partials, partial);
if (g_mime_message_partial_get_total(partial) > 0)
total = g_mime_message_partial_get_total(partial);
......
......@@ -1568,6 +1568,7 @@ GHashTable * libbalsa_mailbox_imap_get_matchings(LibBalsaMailboxImap* mbox,
ImapSearchKey* query;
ImapResponse rc = IMR_NO;
ImapSearchData * cbdata;
GHashTable *result;
*err = FALSE;
......@@ -1606,8 +1607,12 @@ GHashTable * libbalsa_mailbox_imap_get_matchings(LibBalsaMailboxImap* mbox,
_("IMAP SEARCH command failed for mailbox %s\n"
"falling back to default searching method"),
LIBBALSA_MAILBOX(mbox)->url);
};
return cbdata->res;
}
result = cbdata->res;
g_free(cbdata);
return result;
}
/* Returns false if the conditions contain regex matches
......
......@@ -1801,9 +1801,8 @@ lbm_mbox_message_new(GMimeMessage * mime_message,
LibBalsaMessageFlag flags = 0;
#if defined(THIS_HAS_BEEN_TESTED)
if (mime_message->subject &&
!strcmp(mime_message->subject,
"DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA")) {
if (!g_strcmp0(mime_message->subject,
"DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA")) {
return NULL;
}
#endif
......
......@@ -66,7 +66,7 @@ static LibBalsaAddress *cal_address_2445_to_lbaddress(const gchar * uri,
is_organizer);
/* conversion helpers */
static time_t date_time_2445_to_time_t(const gchar * date_time);
static time_t date_time_2445_to_time_t(const gchar *date_time, const gchar *modifier, gboolean *date_only);
static gchar *time_t_to_date_time_2445(time_t ttime);
static gchar *text_2445_unescape(const gchar * text);
static gchar *text_2445_escape(const gchar * text);
......@@ -377,11 +377,11 @@ libbalsa_vcal_new_from_body(LibBalsaMessageBody * body)
in_embedded = TRUE;
else if (!in_embedded) {
if (!g_ascii_strcasecmp(entry[0], "DTSTART"))
event->start = date_time_2445_to_time_t(value);
event->start = date_time_2445_to_time_t(value, entry[1], &event->start_date_only);
else if (!g_ascii_strcasecmp(entry[0], "DTEND"))
event->end = date_time_2445_to_time_t(value);
event->end = date_time_2445_to_time_t(value, entry[1], &event->end_date_only);
else if (!g_ascii_strcasecmp(entry[0], "DTSTAMP"))
event->stamp = date_time_2445_to_time_t(value);