mirror of
https://github.com/openssl/openssl.git
synced 2024-12-14 12:34:02 +08:00
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@openssl.org>
This commit is contained in:
parent
f5d97098a4
commit
c99de0533d
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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) \
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user