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/blenloader/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/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index d735f099dc0..f6ac42c1941 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1318,7 +1318,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) { for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { /* set stroke to palette and force recalculation */ - strcpy(gps->colorname, gpl->info); + BLI_strncpy(gps->colorname, gpl->info, sizeof(gps->colorname)); gps->palcolor = NULL; gps->flag |= GP_STROKE_RECALC_COLOR; gps->thickness = gpl->thickness; |