mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-27 22:39:59 +01:00
g10: Block signals in g10_exit.
* g10/gpg.c (g10_exit): Block all signals before calling emergency_cleanup. -- There is a race condition here which results crash of the process. When a signal is delivered in emergency_cleanup, it is called again. This change fixes the problem. GnuPG-bug-id: 2747 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
0076bef202
commit
537fbe13af
@ -5231,6 +5231,7 @@ g10_exit( int rc )
|
||||
if (opt.debug)
|
||||
gcry_control (GCRYCTL_DUMP_SECMEM_STATS );
|
||||
|
||||
gnupg_block_all_signals ();
|
||||
emergency_cleanup ();
|
||||
|
||||
rc = rc? rc : log_get_errorcount(0)? 2 : g10_errors_seen? 1 : 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user