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 No longer hard-code ...
details: https://anonhg.NetBSD.org/src/rev/04f4f434082a
branches: trunk
changeset: 822843:04f4f434082a
user: khorben <khorben%NetBSD.org@localhost>
date: Sun Apr 09 23:03:50 2017 +0000
description:
No longer hard-code the suffix length
This will avoid a buffer overflow if the suffix changes; it is currently
hard-coded as either "asc" or "sig".
Submitted on tech-pkg@ as:
[PATCH 10/11] No longer hard-code the suffix length
diffstat:
crypto/external/bsd/netpgp/dist/src/lib/signature.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 967a71ca96ab -r 04f4f434082a crypto/external/bsd/netpgp/dist/src/lib/signature.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/signature.c Sun Apr 09 22:50:02 2017 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/signature.c Sun Apr 09 23:03:50 2017 +0000
@@ -57,7 +57,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: signature.c,v 1.36 2017/04/09 22:48:39 khorben Exp $");
+__RCSID("$NetBSD: signature.c,v 1.37 2017/04/09 23:03:50 khorben Exp $");
#endif
#include <sys/types.h>
@@ -909,7 +909,7 @@
fd = pgp_setup_file_write(output, outname, overwrite);
}
} else {
- size_t flen = strlen(inname) + 4 + 1;
+ size_t flen = strlen(inname) + 1 + strlen(suffix) + 1;
char *f = NULL;
if ((f = calloc(1, flen)) == NULL) {
Home |
Main Index |
Thread Index |
Old Index