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/blenkernel/intern/gpencil.c | |
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/blenkernel/intern/gpencil.c')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index e4bac0a947a..2242113b79b 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -1268,7 +1268,7 @@ void BKE_gpencil_palettecolor_changename(bGPdata *gpd, char *oldname, const char for (gpf = gpl->frames.first; gpf; gpf = gpf->next) { for (gps = gpf->strokes.first; gps; gps = gps->next) { if (STREQ(gps->colorname, oldname)) { - strcpy(gps->colorname, newname); + BLI_strncpy(gps->colorname, newname, sizeof(gps->colorname)); } } } |