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>2011-10-20 03:10:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-20 03:10:54 +0400
commit5cf593a778e3dca51a5ebd6b4c23ce6c7b0a7ac6 (patch)
treed5d8889ff9dcffa4c15b7160a8850d3f16b6562e /source/blender/makesrna/intern/rna_lattice.c
parent364fcde86d3cdcb09d075a0445fc2e1eb64170d5 (diff)
strcpy() --> BLI_strncpy(), where source strings are not fixed and target size is known.
Diffstat (limited to 'source/blender/makesrna/intern/rna_lattice.c')
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 2a81c4f0a2c..f30fea659ae 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -179,10 +179,11 @@ static void rna_Lattice_points_w_set(PointerRNA *ptr, int value)
static void rna_Lattice_vg_name_set(PointerRNA *ptr, const char *value)
{
Lattice *lt= ptr->data;
- strcpy(lt->vgroup, value);
+ BLI_strncpy(lt->vgroup, value, sizeof(lt->vgroup));
- if(lt->editlatt)
- strcpy(lt->editlatt->latt->vgroup, value);
+ if(lt->editlatt) {
+ BLI_strncpy(lt->editlatt->latt->vgroup, value, sizeof(lt->editlatt->latt->vgroup));
+ }
}
/* annoying, but is a consequence of RNA structures... */