mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-15 01:23:04 -07:00
chg: use calloc
This commit is contained in:
parent
99b6087b01
commit
ad72a424ef
15 changed files with 36 additions and 27 deletions
|
@ -105,7 +105,7 @@ CborError _cbor_value_dup_string(const CborValue *value, void **buffer, size_t *
|
|||
return err;
|
||||
|
||||
++*buflen;
|
||||
*buffer = malloc(*buflen);
|
||||
*buffer = calloc(*buflen, sizeof(uint8_t));
|
||||
if (!*buffer) {
|
||||
/* out of memory */
|
||||
return CborErrorOutOfMemory;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue