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 netpgp: fix use afte...
details: https://anonhg.NetBSD.org/src/rev/72f08138cd2e
branches: trunk
changeset: 369656:72f08138cd2e
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Aug 27 08:35:01 2022 +0000
description:
netpgp: fix use after free when writing keyring
Same pattern as in the previous commit.
diffstat:
crypto/external/bsd/netpgp/dist/src/lib/netpgp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r 4df3b252e488 -r 72f08138cd2e crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Sat Aug 27 08:31:58 2022 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Sat Aug 27 08:35:01 2022 +0000
@@ -34,7 +34,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: netpgp.c,v 1.104 2022/08/27 08:30:06 rillig Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.105 2022/08/27 08:35:01 rillig Exp $");
#endif
#include <sys/types.h>
@@ -317,8 +317,8 @@
filename = keyringfile(netpgp, name);
if (!pgp_keyring_filewrite(keyring, noarmor, filename, passphrase)) {
+ (void) fprintf(stderr, "Can't write %s %s\n", name, filename);
free(filename);
- (void) fprintf(stderr, "Can't write %s %s\n", name, filename);
return 0;
}
netpgp_setvar(netpgp, name, filename);
Home |
Main Index |
Thread Index |
Old Index