$OpenBSD: patch-src_lib_misc_c,v 1.2 2014/07/11 22:41:03 pascal Exp $
--- src/lib/misc.c.orig	Mon Mar  5 03:20:18 2012
+++ src/lib/misc.c	Sat Jul 12 00:27:33 2014
@@ -437,7 +437,7 @@ hash_bignum(pgp_hash_t *hash, BIGNUM *bignum)
 		(void) fprintf(stderr, "hash_bignum: bad size\n");
 		return 0;
 	}
-	if ((bn = calloc(1, len)) == NULL) {
+	if ((bn = calloc(1, len + 1)) == NULL) {
 		(void) fprintf(stderr, "hash_bignum: bad bn alloc\n");
 		return 0;
 	}
