mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
chg: use calloc
This commit is contained in:
parent
8991fa172d
commit
18db34ffb0
3 changed files with 4 additions and 4 deletions
|
@ -1786,7 +1786,7 @@ int Cmdbin2hex(const char *Cmd) {
|
|||
//Number of digits supplied as argument
|
||||
size_t length = en - bg + 1;
|
||||
size_t bytelen = (length+7) / 8;
|
||||
uint8_t* arr = (uint8_t *) malloc(bytelen);
|
||||
uint8_t* arr = (uint8_t *) calloc(bytelen, sizeof(uint8_t));
|
||||
memset(arr, 0, bytelen);
|
||||
BitstreamOut bout = { arr, 0, 0 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue