patch-src_lib_misc_c 457 B

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