diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-15 02:08:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-15 02:08:56 +0400 |
commit | 9c8516703d24aa5e3f67d563c8f5dfd54592dc1d (patch) | |
tree | 54c013ed6f92050acbaecc8ceab22a898bcfb288 /source/blender/editors/space_clip | |
parent | 1c2ff55334c774cdcf0699387de6e450cef38e99 (diff) |
replace strncpy with BLI_strncpy for cases we expect the string to be NULL terminated.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 7a6da5d8896..de19df9abe2 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -50,6 +50,7 @@ #include "BLI_math.h" #include "BLI_rect.h" #include "BLI_threads.h" +#include "BLI_string.h" #include "BLF_translation.h" @@ -250,13 +251,13 @@ static int open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event) clip = ED_space_clip_get_clip(sc); if (clip) { - strncpy(path, clip->name, sizeof(path)); + BLI_strncpy(path, clip->name, sizeof(path)); BLI_path_abs(path, G.main->name); BLI_parent_dir(path); } else { - strncpy(path, U.textudir, sizeof(path)); + BLI_strncpy(path, U.textudir, sizeof(path)); } if (RNA_struct_property_is_set(op->ptr, "files")) |