gnupg/agent
Justus Winter e175152ef7 agent: Fix double free.
* agent/cache.c (agent_store_cache_hit): Make sure the update is
atomic.
--
Previously, the function freed the last key, and duplicated the new
key after doing that.  There is a chance, however, that calling the
allocator surrenders control to a different thread, causing a double
free if a different thread also calls this function.

To make sure the update is atomic under the non-preemptive thread
model, we must make sure not to surrender control to a different
thread.  Therefore, we avoid calling the allocator during the
update.

Signed-off-by: Justus Winter <justus@g10code.com>
2017-01-25 13:51:57 +01:00
..
ChangeLog-2011 Fix typos 2015-10-28 10:20:17 +01:00
Makefile.am Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
agent.h agent: Ask specific SERIALNO for pksign/pkdecrypt. 2017-01-16 10:33:08 +09:00
cache.c agent: Fix double free. 2017-01-25 13:51:57 +01:00
call-pinentry.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
call-scd.c agent: Ask specific SERIALNO for pksign/pkdecrypt. 2017-01-16 10:33:08 +09:00
command-ssh.c Update copyright notices for 2017. 2017-01-23 19:16:55 +01:00
command.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
cvt-openpgp.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
cvt-openpgp.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
divert-scd.c agent: Ask specific SERIALNO for pksign/pkdecrypt. 2017-01-16 10:33:08 +09:00
findkey.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
genkey.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
gpg-agent-w32info.rc w32: Add icons and version information. 2013-05-07 21:35:48 +02:00
gpg-agent.c Update copyright notices for 2017. 2017-01-23 19:16:55 +01:00
keyformat.txt Fix more spelling 2016-09-17 16:00:37 +09:00
learncard.c agent: Ask specific SERIALNO for pksign/pkdecrypt. 2017-01-16 10:33:08 +09:00
pkdecrypt.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
pksign.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
preset-passphrase.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
protect-tool.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
protect.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-protect.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
trans.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
trustlist.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
w32main.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
w32main.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00