Created attachment 1849 [details] patch of the potential API bugs Hi, I'm a PhD student. I analyzed the claws source code and found some potential API bugs that may cause crashes. These crashes are mainly caused by insufficient error handling of API functions like curl_easy_perform, gdk_keyboard_grab or pthread_create. I think it's unsafe to assume the library function would be correct. It would be better if we could handle the error properly. Attached please find the patch against version claws-mail-3.16.0. Hopefully, it can solve these potential bugs. Best, Zhouyang
Good thing, you're right. Did you proof-test all the modified situations?
Yes, I have tested the modifications, and everything looks good. I think the modified situations still need double checks, since I have limited domain knowledge on detailed code logic.
Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2019-01-03 10:40:04.884976068 +0100 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=54e5f174d6651258b9e04617951c9dcba51f6467 Author: wwp <subscript@free.fr> Date: Thu Jan 3 10:36:37 2019 +0100 Fix few (possible) crashes due to missing return code checks (patch by Zhouyang, with few modifications). Fixes bug #3977: Fix crshes when some external APIs fail