aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/keybox-update.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-05-14 17:05:58 +0000
committerWerner Koch <[email protected]>2019-05-14 17:05:58 +0000
commit49b236af0ecbb6df67513feb4b63851f2e159ea2 (patch)
tree6235b36ce6d1955be5ebc3996b1633e0441f5227 /kbx/keybox-update.c
parentsm: Change keydb code to use the keybox locking. (diff)
downloadgnupg-49b236af0ecbb6df67513feb4b63851f2e159ea2.tar.gz
gnupg-49b236af0ecbb6df67513feb4b63851f2e159ea2.zip
kbx: Fix deadlock in gpgsm on Windows due to a sharing violation.
* kbx/keybox-init.c (keybox_lock) [W32]: Use _keybox_close_file instead of fclose so that a close is done if the file is opened by another handle. * kbx/keybox-search.c (keybox_search): Remember the last offset and use that in NEXT search mode if we had to re-open the file. -- GnuPG-bug-id: 4505 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'kbx/keybox-update.c')
-rw-r--r--kbx/keybox-update.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kbx/keybox-update.c b/kbx/keybox-update.c
index 580330f52..e09fefc41 100644
--- a/kbx/keybox-update.c
+++ b/kbx/keybox-update.c
@@ -423,7 +423,7 @@ keybox_update_keyblock (KEYBOX_HANDLE hd, const void *image, size_t imagelen)
if (off == (off_t)-1)
return gpg_error (GPG_ERR_GENERAL);
- /* Close this the file so that we do no mess up the position for a
+ /* Close the file so that we do no mess up the position for a
next search. */
_keybox_close_file (hd);