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

@ -2988,7 +2988,7 @@ int CmdHf14AMfDecryptBytes(const char *Cmd){
PrintAndLogEx(NORMAL, "ar enc\t%08X", ar_enc);
PrintAndLogEx(NORMAL, "at enc\t%08X", at_enc);
uint8_t *data = malloc(len);
uint8_t *data = calloc(len, sizeof(uint8_t));
param_gethex_ex(Cmd, 3, data, &len);
len >>= 1;
tryDecryptWord( nt, ar_enc, at_enc, data, len);