diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-11 16:33:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-11 16:33:51 +0400 |
commit | e10fd04db0bdcdbc326fce6cddc8af1179a5de5c (patch) | |
tree | a8f3a08b35101e30a0e5d4d1a94e0b2ef50c7122 /source/blender/blenkernel/intern/tracking.c | |
parent | dcef7346eb3f16c27b3f952b6452396e66f5e996 (diff) |
use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
Diffstat (limited to 'source/blender/blenkernel/intern/tracking.c')
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 1957f20c8bf..2f9689bfe0e 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -669,7 +669,7 @@ static TracksMap *tracks_map_new(const char *object_name, int is_camera, int num { TracksMap *map= MEM_callocN(sizeof(TracksMap), "TrackingsMap"); - strcpy(map->object_name, object_name); + BLI_strncpy(map->object_name, object_name, sizeof(map->object_name)); map->is_camera= is_camera; map->num_tracks= num_tracks; @@ -1784,7 +1784,7 @@ MovieReconstructContext* BKE_tracking_reconstruction_context_new(MovieTracking * int sfra= INT_MAX, efra= INT_MIN; MovieTrackingTrack *track; - strcpy(context->object_name, object->name); + BLI_strncpy(context->object_name, object->name, sizeof(context->object_name)); context->is_camera = object->flag&TRACKING_OBJECT_CAMERA; context->tracks_map= tracks_map_new(context->object_name, context->is_camera, num_tracks, 0); |