Home GnuPG
Diffusion GpgOL cf47f74df653

Fix deadlock when selecting encrypt

Description

Fix deadlock when selecting encrypt

* src/mail.cpp (Mail::locateAllCryptoRecipients_o): Use a copy
of the mail map instead of a locked instance.

Locking the mail map for a complex operation is a bad
idea. What happened here is that locateKeys_o can start
different threads and those threads can use "Mail::isValidPtr" which
uses the s_mail_map and locks it accordingly.
So there is a deadlock.

Details

Provenance
aheineckeAuthored on Oct 8 2018, 3:19 PM
Parents
rO9ccdc0cdc025: Add option to do decryption synchronously
Branches
Unknown
Tags
Unknown