use BLI_strncpy and BLI_snprintf when the size of the string is known.
[blender-staging.git] / source / blender / blenkernel / intern / packedFile.c
index 7be8aefc883a2600ed25d8254b8104bbbc026006..2decc40da8110f8297ab98e7d53d529cb6e4aec0 100644 (file)
@@ -251,7 +251,7 @@ static char *find_new_name(char *name)
        
        if (fop_exists(name)) {
                for (number = 1; number <= 999; number++) {
-                       sprintf(tempname, "%s.%03d", name, number);
+                       BLI_snprintf(tempname, sizeof(tempname), "%s.%03d", name, number);
                        if (! fop_exists(tempname)) {
                                break;
                        }