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

@@ -691,7 +691,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>&
if (is_joint)
BLI_snprintf(rna_path, sizeof(rna_path), "%s.%s", joint_path, tm_str);
else
strcpy(rna_path, tm_str);
BLI_strncpy(rna_path, tm_str, sizeof(rna_path));
newcu[i] = create_fcurve(axis, rna_path);
newcu[i]->totvert = frames.size();
}
@@ -1246,7 +1246,7 @@ Object *AnimationImporter::translate_animation_OLD(COLLADAFW::Node *node,
if (is_joint)
BLI_snprintf(rna_path, sizeof(rna_path), "%s.%s", joint_path, tm_str);
else
strcpy(rna_path, tm_str);
BLI_strncpy(rna_path, tm_str, sizeof(rna_path));
newcu[i] = create_fcurve(axis, rna_path);
#ifdef ARMATURE_TEST