mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -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
|
@ -2002,7 +2002,11 @@ int CmdHF14AMfURestore(const char *Cmd){
|
|||
return 1;
|
||||
}
|
||||
|
||||
uint8_t *dump = malloc(fsize);
|
||||
uint8_t *dump = calloc(fsize, sizeof(uint8_t));
|
||||
if ( !dump ) {
|
||||
PrintAndLogEx(WARNING, "Failed to allocate memory");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// read all data
|
||||
size_t bytes_read = fread(dump, 1, fsize, f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue