[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Tue Dec 22 12:33:04 UTC 2015
The branch master has been updated
via c99de0533debc8a6ed08b47b414bdea19457eafd (commit)
from f5d97098a4c5d1c91887a3f2e0a31c1e20ca32e3 (commit)
- Log -----------------------------------------------------------------
commit c99de0533debc8a6ed08b47b414bdea19457eafd
Author: Rich Salz <rsalz at akamai.com>
Date: Wed Dec 16 16:51:12 2015 -0500
Rename *_realloc_clean to *_clear_realloc
Just like *_clear_free routines. Previously undocumented, used
a half-dozen times within OpenSSL source.
Reviewed-by: Richard Levitte <levitte at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/asn1/a_bitstr.c | 2 +-
crypto/asn1/f_int.c | 2 +-
crypto/buffer/buffer.c | 2 +-
crypto/mem.c | 2 +-
include/openssl/crypto.h | 6 +++---
util/libeay.num | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c
index 5f7ae6a..b4e71fd 100644
--- a/crypto/asn1/a_bitstr.c
+++ b/crypto/asn1/a_bitstr.c
@@ -204,7 +204,7 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value)
if ((a->length < (w + 1)) || (a->data == NULL)) {
if (!value)
return (1); /* Don't need to set */
- c = OPENSSL_realloc_clean(a->data, a->length, w + 1);
+ c = OPENSSL_clear_realloc(a->data, a->length, w + 1);
if (c == NULL) {
ASN1err(ASN1_F_ASN1_BIT_STRING_SET_BIT, ERR_R_MALLOC_FAILURE);
return 0;
diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c
index 9a0928e..1c02cc0 100644
--- a/crypto/asn1/f_int.c
+++ b/crypto/asn1/f_int.c
@@ -164,7 +164,7 @@ int 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 * 2);
+ sp = OPENSSL_clear_realloc(s, slen, num + i * 2);
if (sp == NULL) {
ASN1err(ASN1_F_A2I_ASN1_INTEGER, ERR_R_MALLOC_FAILURE);
OPENSSL_free(s);
diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c
index 705037b..0b15c6b 100644
--- a/crypto/buffer/buffer.c
+++ b/crypto/buffer/buffer.c
@@ -179,7 +179,7 @@ size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
if ((str->flags & BUF_MEM_FLAG_SECURE))
ret = sec_alloc_realloc(str, n);
else
- ret = OPENSSL_realloc_clean(str->data, str->max, n);
+ ret = OPENSSL_clear_realloc(str->data, str->max, n);
if (ret == NULL) {
BUFerr(BUF_F_BUF_MEM_GROW_CLEAN, ERR_R_MALLOC_FAILURE);
len = 0;
diff --git a/crypto/mem.c b/crypto/mem.c
index 7ecf0ae..939ad69 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -337,7 +337,7 @@ void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
return ret;
}
-void *CRYPTO_realloc_clean(void *str, size_t old_len, size_t num,
+void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,
const char *file, int line)
{
void *ret = NULL;
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index 8247f68..70feb7f 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -326,8 +326,8 @@ int CRYPTO_is_mem_check_on(void);
# define OPENSSL_strndup(str, s) CRYPTO_strndup((str), (s), __FILE__, __LINE__)
# define OPENSSL_realloc(addr,num) \
CRYPTO_realloc((char *)addr, (int)num, __FILE__, __LINE__)
-# define OPENSSL_realloc_clean(addr,old_num,num) \
- CRYPTO_realloc_clean(addr, old_num, num, __FILE__, __LINE__)
+# define OPENSSL_clear_realloc(addr, old_num, num) \
+ CRYPTO_clear_realloc(addr, old_num, num, __FILE__, __LINE__)
# define OPENSSL_clear_free(addr, num) CRYPTO_clear_free(addr, num)
# define OPENSSL_free(addr) CRYPTO_free(addr)
@@ -480,7 +480,7 @@ char *CRYPTO_strndup(const char *str, size_t s, const char *file, int line);
void CRYPTO_free(void *ptr);
void CRYPTO_clear_free(void *ptr, size_t num);
void *CRYPTO_realloc(void *addr, size_t num, const char *file, int line);
-void *CRYPTO_realloc_clean(void *addr, size_t old_num, size_t num,
+void *CRYPTO_clear_realloc(void *addr, size_t old_num, size_t num,
const char *file, int line);
# define OPENSSL_secure_malloc(num) \
diff --git a/util/libeay.num b/util/libeay.num
index e9a678b..698c938 100755
--- a/util/libeay.num
+++ b/util/libeay.num
@@ -2797,7 +2797,7 @@ EVP_des_ede3_ecb 3236 1_1_0 EXIST::FUNCTION:DES
X509_REQ_print_ex 3237 1_1_0 EXIST::FUNCTION:
ENGINE_up_ref 3238 1_1_0 EXIST::FUNCTION:ENGINE
BUF_MEM_grow_clean 3239 1_1_0 EXIST::FUNCTION:
-CRYPTO_realloc_clean 3240 1_1_0 EXIST::FUNCTION:
+CRYPTO_clear_realloc 3240 1_1_0 EXIST::FUNCTION:
BUF_strlcat 3241 1_1_0 NOEXIST::FUNCTION:
BIO_indent 3242 1_1_0 EXIST::FUNCTION:
BUF_strlcpy 3243 1_1_0 NOEXIST::FUNCTION:
More information about the openssl-commits
mailing list