diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-18 13:14:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-18 13:14:49 +0300 |
commit | 42fd22531f6d53dccdf3f21efb6b6bcc08c1b51b (patch) | |
tree | 400bc315b49c67cd16f698be99da5869aafd951e /source/blender/editors/armature/poselib.c | |
parent | cff0110d0882f2cf90a54648bc59366348b5694b (diff) |
constraints unique name length was set too long (could overrun the buffer), use sizeof() with other instances of BLI_uniquename too
Diffstat (limited to 'source/blender/editors/armature/poselib.c')
-rw-r--r-- | source/blender/editors/armature/poselib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index f251fee236b..5cf44951c37 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -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; |