mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
chg: converting malloc calls -> calloc which zeros out the allocated memory
This commit is contained in:
parent
989b80007c
commit
939b727c42
9 changed files with 55 additions and 50 deletions
|
@ -382,7 +382,7 @@ int CmdHFFelicaDumpLite(const char *Cmd) {
|
|||
}
|
||||
|
||||
uint64_t tracelen = resp.arg[1];
|
||||
uint8_t *trace = malloc(tracelen);
|
||||
uint8_t *trace = calloc(tracelen, sizeof(uint8_t));
|
||||
if ( trace == NULL ) {
|
||||
PrintAndLogEx(WARNING, "Cannot allocate memory for trace");
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue