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/blenkernel/intern/property.c | |
parent | 364fcde86d3cdcb09d075a0445fc2e1eb64170d5 (diff) |
strcpy() --> BLI_strncpy(), where source strings are not fixed and target size is known.
Diffstat (limited to 'source/blender/blenkernel/intern/property.c')
-rw-r--r-- | source/blender/blenkernel/intern/property.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c index cdf2e39a4dd..e0e2876f79e 100644 --- a/source/blender/blenkernel/intern/property.c +++ b/source/blender/blenkernel/intern/property.c @@ -166,7 +166,7 @@ void unique_property(bProperty *first, bProperty *prop, int force) int i= 0; /* strip numbers */ - strcpy(base_name, prop->name); + BLI_strncpy(base_name, prop->name, sizeof(base_name)); for(i= strlen(base_name)-1; (i>=0 && isdigit(base_name[i])); i--) { base_name[i]= '\0'; } @@ -178,7 +178,7 @@ void unique_property(bProperty *first, bProperty *prop, int force) strcat(new_name, num); } while(get_property__internal(first, prop, new_name)); - strcpy(prop->name, new_name); + BLI_strncpy(prop->name, new_name, sizeof(prop->name)); } } } @@ -257,7 +257,7 @@ void set_property(bProperty *prop, char *str) *((float *)&prop->data)= (float)atof(str); break; case GPROP_STRING: - strcpy(prop->poin, str); + strcpy(prop->poin, str); /* TODO - check size? */ break; } |