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

@ -30,7 +30,7 @@ size_t nbytes(size_t nbits) {
}
int CmdLFHitagList(const char *Cmd) {
uint8_t *got = malloc(USB_CMD_DATA_SIZE);
uint8_t *got = calloc(USB_CMD_DATA_SIZE, sizeof(uint8_t));
if ( !got ) {
PrintAndLogEx(WARNING, "Cannot allocate memory for trace");
return 2;