pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/security/netpgp
Module Name: pkgsrc
Committed By: khorben
Date: Thu Mar 15 19:51:08 UTC 2018
Modified Files:
pkgsrc/security/netpgp: Makefile distinfo
Added Files:
pkgsrc/security/netpgp/patches: patch-src_lib_reader.c
Log Message:
Do not truncate pass-phrases without a newline character
This also fixes a crash when the pass-phrase entered is empty.
Originally submitted on tech-pkg@ as:
[PATCH 02/11] Do not truncate pass-phrases without a newline character
Only modified for consistency with the coding style; as also applied in
NetBSD's src repository.
Tested on NetBSD/amd64.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/security/netpgp/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/security/netpgp/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/security/netpgp/patches/patch-src_lib_reader.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/security/netpgp/Makefile
diff -u pkgsrc/security/netpgp/Makefile:1.25 pkgsrc/security/netpgp/Makefile:1.26
--- pkgsrc/security/netpgp/Makefile:1.25 Thu Mar 15 19:37:30 2018
+++ pkgsrc/security/netpgp/Makefile Thu Mar 15 19:51:08 2018
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2018/03/15 19:37:30 khorben Exp $
+# $NetBSD: Makefile,v 1.26 2018/03/15 19:51:08 khorben Exp $
DISTNAME= netpgp-20140220
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_LOCAL}
Index: pkgsrc/security/netpgp/distinfo
diff -u pkgsrc/security/netpgp/distinfo:1.19 pkgsrc/security/netpgp/distinfo:1.20
--- pkgsrc/security/netpgp/distinfo:1.19 Thu Mar 15 19:37:30 2018
+++ pkgsrc/security/netpgp/distinfo Thu Mar 15 19:51:08 2018
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.19 2018/03/15 19:37:30 khorben Exp $
+$NetBSD: distinfo,v 1.20 2018/03/15 19:51:08 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) = 937af3b82b07c2817b3b20e6d76043950c7afd29
+SHA1 (patch-src_lib_reader.c) = 2ebaddebbc2f6f42f7391933ebfef39e3a73a367
Added files:
Index: pkgsrc/security/netpgp/patches/patch-src_lib_reader.c
diff -u /dev/null pkgsrc/security/netpgp/patches/patch-src_lib_reader.c:1.1
--- /dev/null Thu Mar 15 19:51:08 2018
+++ pkgsrc/security/netpgp/patches/patch-src_lib_reader.c Thu Mar 15 19:51:08 2018
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_lib_reader.c,v 1.1 2018/03/15 19:51:08 khorben Exp $
+
+Do not truncate pass-phrases without a newline character.
+
+--- src/lib/reader.c.orig 2012-03-05 02:20:18.000000000 +0000
++++ src/lib/reader.c
+@@ -160,6 +160,7 @@ int
+ pgp_getpassphrase(void *in, char *phrase, size_t size)
+ {
+ char *p;
++ size_t len;
+
+ if (in == NULL) {
+ while ((p = getpass("netpgp passphrase: ")) == NULL) {
+@@ -169,7 +170,10 @@ pgp_getpassphrase(void *in, char *phrase
+ if (fgets(phrase, (int)size, in) == NULL) {
+ return 0;
+ }
+- phrase[strlen(phrase) - 1] = 0x0;
++ len = strlen(phrase);
++ if (len >= 1 && phrase[len - 1] == '\n') {
++ phrase[len - 1] = '\0';
++ }
+ }
+ return 1;
+ }
Home |
Main Index |
Thread Index |
Old Index