mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-16 01:53:02 +08:00
use calloc()
This commit is contained in:
parent
584e0ad833
commit
182d167aad
1 changed files with 1 additions and 1 deletions
|
@ -4102,7 +4102,7 @@ int CmdHF14MfuNDEFRead(const char *Cmd) {
|
|||
// utility function. Retrieves emulator memory
|
||||
static int GetMfuDumpFromEMul(mfu_dump_t **buf) {
|
||||
|
||||
uint8_t *dump = malloc(sizeof(mfu_dump_t));
|
||||
uint8_t *dump = calloc(MFU_MAX_BYTES + MFU_DUMP_PREFIX_LENGTH, sizeof(uint8_t));
|
||||
if (dump == NULL) {
|
||||
PrintAndLogEx(WARNING, "Fail, cannot allocate memory");
|
||||
return PM3_EMALLOC;
|
||||
|
|
Loading…
Reference in a new issue