mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-28 19:21:08 +00:00
Use mbedtls_calloc instead of calloc
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
parent
55d93192b1
commit
4294ccc608
@ -145,7 +145,7 @@ static char *x509_oid_from_numericoid(const char *numericoid,
|
||||
mbedtls_free(oid_buf);
|
||||
return NULL;
|
||||
}
|
||||
oid = calloc(1, oid_buf->len + 1);
|
||||
oid = mbedtls_calloc(1, oid_buf->len + 1);
|
||||
memcpy(oid, oid_buf->p, oid_buf->len);
|
||||
oid[oid_buf->len + 1] = '\0';
|
||||
mbedtls_free(oid_buf->p);
|
||||
@ -285,7 +285,7 @@ int mbedtls_x509_string_to_names(mbedtls_asn1_named_data **head, const char *nam
|
||||
numericoid = 1;
|
||||
}
|
||||
} else {
|
||||
oid = calloc(1, strlen(attr_descr->oid));
|
||||
oid = mbedtls_calloc(1, strlen(attr_descr->oid));
|
||||
strcpy(oid, attr_descr->oid);
|
||||
numericoid = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user