[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-222-g2365b058e

wwp at claws-mail.org wwp at claws-mail.org
Sun Sep 26 19:32:24 CEST 2021


The branch, gtk3 has been updated
       via  2365b058e7ac75afc82e06ad43ead42fdee0c98f (commit)
      from  e06ed0f0118b48dedef6c951680b55f25a038416 (commit)

Summary of changes:
 src/summaryview.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 2365b058e7ac75afc82e06ad43ead42fdee0c98f
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 ce3ce1cd7..ff7e6d917 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -7551,12 +7551,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