From 5cf593a778e3dca51a5ebd6b4c23ce6c7b0a7ac6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Oct 2011 23:10:54 +0000 Subject: strcpy() --> BLI_strncpy(), where source strings are not fixed and target size is known. --- source/blender/blenkernel/intern/property.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/property.c') 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; } -- cgit v1.2.3