chg: use calloc
This commit is contained in:
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user