strcpy() --> BLI_strncpy(), where source strings are not fixed and target size is known.

This commit is contained in:
2011-10-19 23:10:54 +00:00
parent 364fcde86d
commit 5cf593a778
39 changed files with 118 additions and 122 deletions

View File

@@ -481,12 +481,12 @@ void RE_set_customdata_names(ObjectRen *obr, CustomData *data)
layer= &data->layers[i];
if (layer->type == CD_MTFACE) {
strcpy(obr->mtface[mtfn++], layer->name);
BLI_strncpy(obr->mtface[mtfn++], layer->name, sizeof(layer->name));
obr->actmtface= CLAMPIS(layer->active_rnd, 0, numtf);
obr->bakemtface= layer->active;
}
else if (layer->type == CD_MCOL) {
strcpy(obr->mcol[mcn++], layer->name);
BLI_strncpy(obr->mcol[mcn++], layer->name, sizeof(layer->name));
obr->actmcol= CLAMPIS(layer->active_rnd, 0, numcol);
}
}