Use snprintf() instead of sprintf() (#5907)

This commit is contained in:
Flössie
2020-09-15 14:56:57 +02:00
parent 49937a589f
commit 79278875da
18 changed files with 117 additions and 101 deletions

View File

@@ -1047,7 +1047,7 @@ DCraw::dcraw_coeff_overrides(const char make[], const char model[], const int is
}
char name[strlen(make) + strlen(model) + 32];
sprintf(name, "%s %s", make, model);
snprintf(name, sizeof(name), "%s %s", make, model);
for (size_t i = 0; i < sizeof table / sizeof(table[0]); i++) {
if (strcasecmp(name, table[i].prefix) == 0) {