From 294ab72401fb4b21de1eb8cfc698fba7c7f676f9 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 13 May 2018 13:48:08 +0000 Subject: Use recallocarray() instead of OPENSSL_realloc_clean(). Also place all of the OPENSSL_* memory related prototypes under #ifndef LIBRESSL_INTERNAL. ok beck@ tb@ --- src/lib/libcrypto/asn1/f_int.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/asn1/f_int.c') diff --git a/src/lib/libcrypto/asn1/f_int.c b/src/lib/libcrypto/asn1/f_int.c index 9849a7c8fc..d03fafe87d 100644 --- a/src/lib/libcrypto/asn1/f_int.c +++ b/src/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; } -- cgit v1.2.3-55-g6feb