Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-16 12:43:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-16 12:43:05 +0400
commit9a469b62cabf3d434de68c9e698970cc7f060136 (patch)
tree67e4734d9a1ed57e743a1115ceeeaafc68507c24 /source/blender/editors
parentdb4d342223e699407ad71f917a58d5d86a167073 (diff)
replace strcpy with BLI_strncpy or memcpy when the size is known.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mask/mask_relationships.c5
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c1
-rw-r--r--source/blender/editors/transform/transform_orientations.c7
3 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/mask/mask_relationships.c b/source/blender/editors/mask/mask_relationships.c
index a1f2539ce7c..2a1bdee32f7 100644
--- a/source/blender/editors/mask/mask_relationships.c
+++ b/source/blender/editors/mask/mask_relationships.c
@@ -31,6 +31,7 @@
#include "BLI_math.h"
+#include "BLI_string.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
@@ -143,8 +144,8 @@ static int mask_parent_set_exec(bContext *C, wmOperator *UNUSED(op))
if (MASKPOINT_ISSEL_ANY(point)) {
point->parent.id_type = ID_MC;
point->parent.id = &clip->id;
- strcpy(point->parent.parent, tracking_object->name);
- strcpy(point->parent.sub_parent, track->name);
+ BLI_strncpy(point->parent.parent, tracking_object->name, sizeof(point->parent.parent));
+ BLI_strncpy(point->parent.sub_parent, track->name, sizeof(point->parent.sub_parent));
copy_v2_v2(point->parent.parent_orig, parmask_pos);
}
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index ebb48960b80..70690e2dce7 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -38,6 +38,7 @@
#include "DNA_screen_types.h"
#include "DNA_smoke_types.h"
#include "DNA_view3d_types.h"
+#include "DNA_property_types.h"
#include "BLI_utildefines.h"
#include "BLI_blenlib.h"
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index d758a15f50c..e865680ebd3 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -437,7 +437,7 @@ int BIF_countTransformOrientation(const bContext *C)
return count;
}
-void applyTransformOrientation(const bContext *C, float mat[3][3], char *name)
+void applyTransformOrientation(const bContext *C, float mat[3][3], char name[MAX_NAME])
{
TransformOrientation *ts;
View3D *v3d = CTX_wm_view3d(C);
@@ -448,8 +448,9 @@ void applyTransformOrientation(const bContext *C, float mat[3][3], char *name)
for (i = 0, ts = CTX_data_scene(C)->transform_spaces.first; ts; ts = ts->next, i++) {
if (selected_index == i) {
- if (name)
- strcpy(name, ts->name);
+ if (name) {
+ BLI_strncpy(name, ts->name, MAX_NAME);
+ }
copy_m3_m3(mat, ts->mat);
break;