diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2018-05-13 13:48:09 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2018-05-13 13:48:09 +0000 |
commit | da95a920f88e84e199046ae61fb257b87d10c148 (patch) | |
tree | 32d6004262f6ce7326327b511d710990b191982a /lib/libcrypto/asn1/f_int.c | |
parent | 428bd889a7b149d269a69cae4961b97eee2f6b80 (diff) |
Use recallocarray() instead of OPENSSL_realloc_clean().
Also place all of the OPENSSL_* memory related prototypes under #ifndef
LIBRESSL_INTERNAL.
ok beck@ tb@
Diffstat (limited to 'lib/libcrypto/asn1/f_int.c')
-rw-r--r-- | lib/libcrypto/asn1/f_int.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libcrypto/asn1/f_int.c b/lib/libcrypto/asn1/f_int.c index 9849a7c8fca..d03fafe87d3 100644 --- a/lib/libcrypto/asn1/f_int.c +++ b/lib/libcrypto/asn1/f_int.c @@ -1,4 +1,4 @@ -/* $OpenBSD: f_int.c,v 1.19 2018/04/25 11:48:21 tb Exp $ */ +/* $OpenBSD: f_int.c,v 1.20 2018/05/13 13:48:08 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -158,8 +158,7 @@ a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) } i /= 2; if (num + i > slen) { - sp = OPENSSL_realloc_clean(s, slen, num + i); - if (sp == NULL) { + if ((sp = recallocarray(s, slen, num + i, 1)) == NULL) { ASN1error(ERR_R_MALLOC_FAILURE); goto err; } |