chg: converting malloc calls -> calloc which zeros out the allocated memory

This commit is contained in:
iceman1001 2018-05-03 19:42:16 +02:00
commit 939b727c42
9 changed files with 55 additions and 50 deletions

View file

@ -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;