[Commits] [SCM] claws branch, master, updated. 3.18.0-264-g68b65ac49
wwp at claws-mail.org
wwp at claws-mail.org
Thu Oct 7 09:16:27 CEST 2021
The branch, master has been updated
via 68b65ac49c4d51ef855fd65e2a9206e528190a82 (commit)
from 263eb81335dd2052f10d7d6fd94f4810e085605a (commit)
Summary of changes:
src/export.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 68b65ac49c4d51ef855fd65e2a9206e528190a82
Author: wwp <subscript at free.fr>
Date: Thu Oct 7 09:14:02 2021 +0200
Fix CID 1491311: dereference after null check.
Wrong logic there: we should fail if pointers are null, not only if strings are empty,
even though gtk_entry_get_text should never return null).
diff --git a/src/export.c b/src/export.c
index 1bc715ddd..d096fd5a3 100644
--- a/src/export.c
+++ b/src/export.c
@@ -201,12 +201,12 @@ static void export_ok_cb(GtkWidget *widget, gpointer data)
srcdir = gtk_entry_get_text(GTK_ENTRY(src_entry));
utf8mbox = gtk_entry_get_text(GTK_ENTRY(file_entry));
- if (utf8mbox && !*utf8mbox) {
+ if (!utf8mbox || !*utf8mbox) {
alertpanel_error(_("Target mbox filename can't be left empty."));
gtk_widget_grab_focus(file_entry);
return;
}
- if (srcdir && !*srcdir) {
+ if (!srcdir || !*srcdir) {
alertpanel_error(_("Source folder can't be left empty."));
gtk_widget_grab_focus(src_entry);
return;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list