diff options
Diffstat (limited to 'security/netpgp')
-rw-r--r-- | security/netpgp/Makefile | 4 | ||||
-rw-r--r-- | security/netpgp/distinfo | 3 | ||||
-rw-r--r-- | security/netpgp/patches/patch-src_lib_keyring.c | 21 |
3 files changed, 25 insertions, 3 deletions
diff --git a/security/netpgp/Makefile b/security/netpgp/Makefile index b6990c2627c..8a09f9884b0 100644 --- a/security/netpgp/Makefile +++ b/security/netpgp/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.23 2016/03/05 11:29:22 jperkin Exp $ +# $NetBSD: Makefile,v 1.24 2017/02/20 01:09:11 khorben Exp $ DISTNAME= netpgp-20140220 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= security MASTER_SITES= ${MASTER_SITE_LOCAL} diff --git a/security/netpgp/distinfo b/security/netpgp/distinfo index 6e74ae7b110..16384a04f9b 100644 --- a/security/netpgp/distinfo +++ b/security/netpgp/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.17 2015/11/04 01:17:51 agc Exp $ +$NetBSD: distinfo,v 1.18 2017/02/20 01:09:11 khorben Exp $ SHA1 (netpgp-20140220.tar.gz) = 815418cbae5d02a1385cd7947618303e5aa06d5c RMD160 (netpgp-20140220.tar.gz) = 970f55292852d5dbfde3eb17a5fefd6a7c820c4e SHA512 (netpgp-20140220.tar.gz) = ec6cfa0131cd50aee273b81cd64f448258121d7e9c8d4914be39ba59b5c28149bced3866c57f521167480da04b60d9d9bd2b228319dc8baa31328fb7c37e6b96 Size (netpgp-20140220.tar.gz) = 1521820 bytes +SHA1 (patch-src_lib_keyring.c) = f683cafb0f9adac354d3eb90b47f5236db6b8656 diff --git a/security/netpgp/patches/patch-src_lib_keyring.c b/security/netpgp/patches/patch-src_lib_keyring.c new file mode 100644 index 00000000000..5e8407b1fef --- /dev/null +++ b/security/netpgp/patches/patch-src_lib_keyring.c @@ -0,0 +1,21 @@ +$NetBSD: patch-src_lib_keyring.c,v 1.1 2017/02/20 01:09:11 khorben Exp $ + +Do not crash when listing keys without a keyring + +--- src/lib/keyring.c.orig 2017-02-20 01:03:25.000000000 +0000 ++++ src/lib/keyring.c +@@ -993,9 +993,12 @@ pgp_keyring_list(pgp_io_t *io, const pgp + { + pgp_key_t *key; + unsigned n; ++ unsigned keyc = (keyring != NULL) ? keyring->keyc : 0; + +- (void) fprintf(io->res, "%u key%s\n", keyring->keyc, +- (keyring->keyc == 1) ? "" : "s"); ++ (void) fprintf(io->res, "%u key%s\n", keyc, (keyc == 1) ? "" : "s"); ++ if (keyring == NULL) { ++ return 1; ++ } + for (n = 0, key = keyring->keys; n < keyring->keyc; ++n, ++key) { + if (pgp_is_key_secret(key)) { + pgp_print_keydata(io, keyring, key, "sec", |