[Pkg-gnupg-commit] [gnupg2] 147/292: g10: Write first keybox record in binary mode
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Nov 21 06:31:36 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit f7e50634be71ce3028726f23edf14454109a04a8
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Fri Oct 21 14:59:26 2016 +0200
g10: Write first keybox record in binary mode
* g10/keydb.c (maybe_create_keyring_or_box): Open in binary mode.
--
This fixes keybox corruption on windows.
Signed-off-by: Andre Heinecke <aheinecke at intevation.de>
---
g10/keydb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/g10/keydb.c b/g10/keydb.c
index e49e25f..b959f05 100644
--- a/g10/keydb.c
+++ b/g10/keydb.c
@@ -415,7 +415,7 @@ maybe_create_keyring_or_box (char *filename, int is_box, int force_create)
that the detection magic will work the next time it is used. */
if (is_box)
{
- FILE *fp = fopen (filename, "w");
+ FILE *fp = fopen (filename, "wb");
if (!fp)
rc = gpg_error_from_syserror ();
else
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list