[Commits] [SCM] claws branch, master, updated. 3.18.0-164-g943c87cd3
wwp at claws-mail.org
wwp at claws-mail.org
Sun Sep 26 19:32:19 CEST 2021
The branch, master has been updated
via 943c87cd311268d9c9d0766197c2ede061aa58ad (commit)
from dd061389c3c09cc668fd4cf272a55c7290deb1e9 (commit)
Summary of changes:
src/summaryview.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 943c87cd311268d9c9d0766197c2ede061aa58ad
Author: wwp <subscript at free.fr>
Date: Sun Sep 26 19:30:14 2021 +0200
Fix CID 1491354: null ptr dereference,
add warnings in case of unexpected filename encoding conversion or copy failures.
diff --git a/src/summaryview.c b/src/summaryview.c
index b31fb84e7..b79c4a37e 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -7583,12 +7583,18 @@ static void summary_drag_data_get(GtkWidget *widget,
san_subject, msginfo->msgnum);
g_free(san_subject);
san_subject = g_filename_from_utf8(dest, -1, NULL, NULL, NULL);
- g_free(dest);
- dest = san_subject;
- if (copy_file(tmp2, dest, TRUE) == 0) {
- g_free(tmp2);
- tmp2 = dest;
+ if (!san_subject) {
+ g_warning("failed to convert encoding of file name: %s", dest);
+ } else {
+ g_free(dest);
+ dest = san_subject;
}
+ if (copy_file(tmp2, dest, TRUE) < 0) {
+ g_warning("summary_drag_data_get: can't copy %s to %s",
+ tmp2, dest);
+ }
+ g_free(tmp2);
+ tmp2 = dest;
}
tmp1 = g_filename_to_uri(tmp2, NULL, NULL);
g_free(tmp2);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list