mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
chg: use calloc
This commit is contained in:
parent
99b6087b01
commit
ad72a424ef
15 changed files with 36 additions and 27 deletions
|
@ -118,7 +118,7 @@ char * mtostr(const model_t *model) {
|
|||
+ (checkstr && *checkstr ? strlen(checkstr) : 6)
|
||||
+ (magicstr && *magicstr ? strlen(magicstr) : 6)
|
||||
+ (model->name && *model->name ? 2 + strlen(model->name) : 6);
|
||||
if ((string = malloc(size))) {
|
||||
if ((string = calloc(size, sizeof(uint8_t)))) {
|
||||
sprintf(strbuf, "\"%s\"", model->name);
|
||||
sprintf(string,
|
||||
"width=%lu "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue