constraints unique name length was set too long (could overrun the buffer), use sizeof() with other instances of BLI_uniquename too

This commit is contained in:
2010-02-18 10:14:49 +00:00
parent cff0110d08
commit 42fd22531f
12 changed files with 19 additions and 19 deletions

View File

@@ -373,7 +373,7 @@ static int poselib_add_exec (bContext *C, wmOperator *op)
}
/* validate name */
BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), 64);
BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), sizeof(marker->name));
/* init common-key-source for use by KeyingSets */
memset(&cks, 0, sizeof(bCommonKeySrc));
@@ -578,7 +578,7 @@ static int poselib_rename_exec (bContext *C, wmOperator *op)
/* copy name and validate it */
BLI_strncpy(marker->name, newname, sizeof(marker->name));
BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), 64);
BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), sizeof(marker->name));
/* done */
return OPERATOR_FINISHED;