mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
chg: converting some more malloc calls -> calloc
This commit is contained in:
parent
939b727c42
commit
faa6ece881
3 changed files with 4 additions and 4 deletions
|
@ -253,8 +253,8 @@ int CmdAnalyseCRC(const char *Cmd) {
|
|||
if ( len & 1 ) return usage_analyse_crc();
|
||||
|
||||
// add 1 for null terminator.
|
||||
uint8_t *data = malloc(len+1);
|
||||
if ( data == NULL ) return 1;
|
||||
uint8_t *data = calloc(len+1, sizeof(uint8_t));
|
||||
if ( !data ) return 1;
|
||||
|
||||
if ( param_gethex(Cmd, 0, data, len)) {
|
||||
free(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue