Module Name:    src
Committed By:   agc
Date:           Wed Jun  2 03:38:02 UTC 2010

Modified Files:
        src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c

Log Message:
Check for a null keyring before listing keys - with thanks to Jeff Rizzo
for the problem report.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 \
    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.57 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.58
--- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.57	Tue Jun  1 05:22:38 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c	Wed Jun  2 03:38:01 2010
@@ -34,7 +34,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: netpgp.c,v 1.57 2010/06/01 05:22:38 agc Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.58 2010/06/02 03:38:01 agc Exp $");
 #endif
 
 #include <sys/types.h>
@@ -561,6 +561,10 @@
 int
 netpgp_list_keys(netpgp_t *netpgp, const int psigs)
 {
+	if (netpgp->pubring == NULL) {
+		(void) fprintf(stderr, "No keyring\n");
+		return 0;
+	}
 	return __ops_keyring_list(netpgp->io, netpgp->pubring, psigs);
 }
 

Reply via email to