OpenSSL 1.1.1-pre2

This commit is contained in:
Hakase
2018-04-07 17:29:40 +09:00
parent 82a44d2483
commit bbac8ca55d
17755 changed files with 221242 additions and 98415 deletions
+10 -10
View File
@@ -25,7 +25,7 @@ BUF_MEM *BUF_MEM_new_ex(unsigned long flags)
ret = BUF_MEM_new();
if (ret != NULL)
ret->flags = flags;
return (ret);
return ret;
}
BUF_MEM *BUF_MEM_new(void)
@@ -35,9 +35,9 @@ BUF_MEM *BUF_MEM_new(void)
ret = OPENSSL_zalloc(sizeof(*ret));
if (ret == NULL) {
BUFerr(BUF_F_BUF_MEM_NEW, ERR_R_MALLOC_FAILURE);
return (NULL);
return NULL;
}
return (ret);
return ret;
}
void BUF_MEM_free(BUF_MEM *a)
@@ -68,7 +68,7 @@ static char *sec_alloc_realloc(BUF_MEM *str, size_t len)
str->data = NULL;
}
}
return (ret);
return ret;
}
size_t BUF_MEM_grow(BUF_MEM *str, size_t len)
@@ -78,13 +78,13 @@ size_t BUF_MEM_grow(BUF_MEM *str, size_t len)
if (str->length >= len) {
str->length = len;
return (len);
return len;
}
if (str->max >= len) {
if (str->data != NULL)
memset(&str->data[str->length], 0, len - str->length);
str->length = len;
return (len);
return len;
}
/* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
if (len > LIMIT_BEFORE_EXPANSION) {
@@ -105,7 +105,7 @@ size_t BUF_MEM_grow(BUF_MEM *str, size_t len)
memset(&str->data[str->length], 0, len - str->length);
str->length = len;
}
return (len);
return len;
}
size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
@@ -117,12 +117,12 @@ size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
if (str->data != NULL)
memset(&str->data[len], 0, str->length - len);
str->length = len;
return (len);
return len;
}
if (str->max >= len) {
memset(&str->data[str->length], 0, len - str->length);
str->length = len;
return (len);
return len;
}
/* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
if (len > LIMIT_BEFORE_EXPANSION) {
@@ -143,7 +143,7 @@ size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
memset(&str->data[str->length], 0, len - str->length);
str->length = len;
}
return (len);
return len;
}
void BUF_reverse(unsigned char *out, const unsigned char *in, size_t size)