From e10fd04db0bdcdbc326fce6cddc8af1179a5de5c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Jan 2012 12:33:51 +0000 Subject: use BLI_strncpy and BLI_snprintf when the size of the string is known. fix for sequencer unique naming which was missed with string length update. --- source/blender/blenkernel/intern/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 d6c4b5f3a2e..5668907b094 100644 --- a/source/blender/blenkernel/intern/property.c +++ b/source/blender/blenkernel/intern/property.c @@ -171,7 +171,7 @@ void unique_property(bProperty *first, bProperty *prop, int force) i= 0; do { /* ensure we have enough chars for the new number in the name */ - sprintf(num, "%d", i++); + BLI_snprintf(num, sizeof(num), "%d", i++); BLI_strncpy(new_name, base_name, sizeof(prop->name) - strlen(num)); strcat(new_name, num); } while(get_property__internal(first, prop, new_name)); -- cgit v1.2.3