Module Name: src
Committed By: jhigh
Date: Sat Mar 21 01:07:21 UTC 2020
Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c
Log Message:
cleanly fail initialization on empty keyring
To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 \
src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.102 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.103
--- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.102 Tue Nov 13 14:52:30 2018
+++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Sat Mar 21 01:07:21 2020
@@ -34,7 +34,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: netpgp.c,v 1.102 2018/11/13 14:52:30 mlelstv Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.103 2020/03/21 01:07:21 jhigh Exp $");
#endif
#include <sys/types.h>
@@ -429,7 +429,7 @@ get_first_ring(pgp_keyring_t *ring, char
int i;
int n;
- if (ring == NULL) {
+ if (ring == NULL || ring->keyc == 0) {
return 0;
}
(void) memset(id, 0x0, len);