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

This commit is contained in:
iceman1001 committed 2018-05-03 19:42:16 +02:00
1 parent 989b80007c
commit 939b727c42
9 files changed
+55 -50

No files matched your search

+1 -1
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;