Fix some sizes
This commit is contained in:
@@ -1046,8 +1046,10 @@ DCraw::dcraw_coeff_overrides(const char make[], const char model[], const int is
|
||||
}
|
||||
}
|
||||
|
||||
char name[strlen(make) + strlen(model) + 32];
|
||||
snprintf(name, sizeof(name), "%s %s", make, model);
|
||||
const std::size_t name_size = strlen(make) + strlen(model) + 32;
|
||||
|
||||
char name[name_size];
|
||||
snprintf(name, name_size, "%s %s", make, model);
|
||||
|
||||
for (size_t i = 0; i < sizeof table / sizeof(table[0]); i++) {
|
||||
if (strcasecmp(name, table[i].prefix) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user