diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-08-18 16:45:20 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-08-18 17:06:11 +0300 |
commit | 2e6d4270cdd4dab1964af4427f833846e4aef4a7 (patch) | |
tree | 0278bd6ecbc558f3f8d06bf53b27c50c4d1c6722 /source/blender/makesrna/intern | |
parent | 7b4ba65a87a342ec0fba12a410950635c575d60f (diff) |
Cleanup/security fix: do not use strcpy (at least in new code).
This function is only really secure in a very limited amount of cases,
and can especially bite you later if you change some buffer sizes...
So not worth bothering with it, just always use BLI_strncpy instead.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 48d7dcfa2e4..3ecaec75c77 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -483,7 +483,7 @@ static bGPDstroke *rna_GPencil_stroke_new(bGPDframe *frame, const char *colornam { bGPDstroke *stroke = MEM_callocN(sizeof(bGPDstroke), "gp_stroke"); if (colorname) { - strcpy(stroke->colorname, colorname); + BLI_strncpy(stroke->colorname, colorname, sizeof(stroke->colorname)); } stroke->palcolor = NULL; stroke->flag |= GP_STROKE_RECALC_COLOR; |