Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/netpgp/dist/src/lib Do not use random da...
details: https://anonhg.NetBSD.org/src/rev/d948e7228c89
branches: trunk
changeset: 352350:d948e7228c89
user: khorben <khorben%NetBSD.org@localhost>
date: Mon Mar 27 21:00:43 2017 +0000
description:
Do not use random data for pass-phrases on EOF
Submitted on tech-pkg@ as:
[PATCH 04/11] Do not use random data for pass-phrases on EOF
Only modified for consistency with the coding style.
diffstat:
crypto/external/bsd/netpgp/dist/src/lib/keyring.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r 236fba1625fd -r d948e7228c89 crypto/external/bsd/netpgp/dist/src/lib/keyring.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/keyring.c Mon Mar 27 20:55:13 2017 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/keyring.c Mon Mar 27 21:00:43 2017 +0000
@@ -57,7 +57,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: keyring.c,v 1.52 2017/03/27 20:55:13 khorben Exp $");
+__RCSID("$NetBSD: keyring.c,v 1.53 2017/03/27 21:00:43 khorben Exp $");
#endif
#ifdef HAVE_FCNTL_H
@@ -244,7 +244,9 @@
break;
case PGP_GET_PASSPHRASE:
- (void) pgp_getpassphrase(decrypt->passfp, pass, sizeof(pass));
+ if (pgp_getpassphrase(decrypt->passfp, pass, sizeof(pass)) == 0) {
+ pass[0] = '\0';
+ }
*content->skey_passphrase.passphrase = netpgp_strdup(pass);
pgp_forget(pass, sizeof(pass));
return PGP_KEEP_MEMORY;
Home |
Main Index |
Thread Index |
Old Index