mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue