mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
chg: calloc calls
This commit is contained in:
parent
5f2ecf67cd
commit
66c82d16b0
3 changed files with 6 additions and 6 deletions
|
@ -483,7 +483,7 @@ int CmdLegicRdmem(const char *Cmd) {
|
|||
PrintAndLogEx(NORMAL, "Reading %d bytes, from offset %d", len, offset);
|
||||
|
||||
// allocate receiver buffer
|
||||
uint8_t *data = malloc(len);
|
||||
uint8_t *data = calloc(len, sizeof(uint8_t));
|
||||
if ( !data ){
|
||||
PrintAndLogEx(WARNING, "Cannot allocate memory");
|
||||
return 2;
|
||||
|
@ -923,7 +923,7 @@ int CmdLegicDump(const char *Cmd){
|
|||
else
|
||||
sprintf(fnameptr + fileNlen,".bin");
|
||||
|
||||
f = fopen(filename,"wb");
|
||||
f = fopen(filename, "wb");
|
||||
if (!f) {
|
||||
PrintAndLogEx(WARNING, "Could not create file name %s", filename);
|
||||
if (data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue