diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-20 03:10:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-20 03:10:54 +0400 |
commit | 5cf593a778e3dca51a5ebd6b4c23ce6c7b0a7ac6 (patch) | |
tree | d5d8889ff9dcffa4c15b7160a8850d3f16b6562e /source/blender/makesrna/intern/rna_lattice.c | |
parent | 364fcde86d3cdcb09d075a0445fc2e1eb64170d5 (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.c | 7 |
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... */ |