[Commits] [SCM] claws branch, master, updated. 3.18.0-233-ge66db4b26

wwp at claws-mail.org wwp at claws-mail.org
Mon Oct 4 10:39:36 CEST 2021


The branch, master has been updated
       via  e66db4b2667173badcffbf652b850857f0d3d94f (commit)
      from  3ba77c4ef28c35a9f331606c7f531f4cf94e39c6 (commit)

Summary of changes:
 src/prefs_filtering.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit e66db4b2667173badcffbf652b850857f0d3d94f
Author: wwp <subscript at free.fr>
Date:   Mon Oct 4 10:39:08 2021 +0200

    Fix  (in a better way) CID 1491324: use after free.

diff --git a/src/prefs_filtering.c b/src/prefs_filtering.c
index 3d8c2b31f..67baa4da7 100644
--- a/src/prefs_filtering.c
+++ b/src/prefs_filtering.c
@@ -795,13 +795,15 @@ static void delete_path(GSList ** p_filters, const gchar * path)
                                 prefixlen = destlen - pathlen;
                                 suffix = action->destination + prefixlen;
                                 
-                                if (suffix && !strncmp(path, suffix, pathlen)) {
+                                if ((suffix && !strncmp(path, suffix, pathlen)) && filtering) {
                                         filters = g_slist_remove(filters, filtering);
                                         filteringprop_free(filtering);
+                                        filtering = NULL;
                                 }
-                        } else if (strcmp(action->destination, path) == 0) {
+                        } else if ((strcmp(action->destination, path) == 0) && filtering) {
                                 filters = g_slist_remove(filters, filtering);
                                 filteringprop_free(filtering);
+                                filtering = NULL;
                         }
                 }
         }                

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list