Bug 4354 - clawss-mail crashes in addr_comparison_func
Summary: clawss-mail crashes in addr_comparison_func
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI (show other bugs)
Version: 3.17.6
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2020-06-21 11:01 UTC by Jens Gustedt
Modified: 2020-09-25 08:47 UTC (History)
0 users

See Also:


Attachments
patch to mitigate the crash (503 bytes, patch)
2020-06-21 11:01 UTC, Jens Gustedt
no flags Details | Diff

Description Jens Gustedt 2020-06-21 11:01:37 UTC
Created attachment 2064 [details]
patch to mitigate the crash

For some folders claws-mail crashes in this function because some of the pointed-to names are null. This happens to me with the version that is distributed version in Ubuntu LTS 20.4 as well as with a freshly compiled version from git.


This function is not really complicated so adding

+        else if (!a_ref || !b_ref)
+               return 1;
+        else if (!a_ref->name || !b_ref->name)
+               return 1;

helped. (I am attaching a patch, just in case.)

Knowing if there is a general assumption here, that these can't be null or not, is beyond my expertise as a simple user, but I would think that adding such a check is a good idea, anyhow.

Thanks
Jens
Comment 1 Paul 2020-09-25 08:47:19 UTC
Probably fixed by this commit: https://git.claws-mail.org/?p=claws.git;a=commitdiff;h=362658e335d54328180d916802120ca500193c8d;hp=38563fce7dcf592ea3830a8696e6e574d2b4b973

please test and re-open if your patch is also needed. thanks.

Note You need to log in before you can comment on or make changes to this bug.