mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-29 00:18:06 -04:00
Rename minimum_mem to resized_mem
This new name is clearer about its purpose. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
5d074168f3
commit
45d5e2dc1a
@ -956,7 +956,7 @@ int mbedtls_oid_from_numeric_string(mbedtls_asn1_buf *oid,
|
||||
unsigned int val = 0;
|
||||
unsigned int component1, component2;
|
||||
size_t encoded_len;
|
||||
unsigned char *minimum_mem;
|
||||
unsigned char *resized_mem;
|
||||
|
||||
/* Count the number of dots to get a worst-case allocation size. */
|
||||
size_t num_dots = 0;
|
||||
@ -1043,14 +1043,14 @@ int mbedtls_oid_from_numeric_string(mbedtls_asn1_buf *oid,
|
||||
}
|
||||
|
||||
encoded_len = out_ptr - oid->p;
|
||||
minimum_mem = mbedtls_calloc(encoded_len, 1);
|
||||
if (minimum_mem == NULL) {
|
||||
resized_mem = mbedtls_calloc(encoded_len, 1);
|
||||
if (resized_mem == NULL) {
|
||||
ret = MBEDTLS_ERR_ASN1_ALLOC_FAILED;
|
||||
goto error;
|
||||
}
|
||||
memcpy(minimum_mem, oid->p, encoded_len);
|
||||
memcpy(resized_mem, oid->p, encoded_len);
|
||||
mbedtls_free(oid->p);
|
||||
oid->p = minimum_mem;
|
||||
oid->p = resized_mem;
|
||||
oid->len = encoded_len;
|
||||
|
||||
oid->tag = MBEDTLS_ASN1_OID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user