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/animation | |
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/animation')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 58db9cade04..78d579cae4e 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -187,10 +187,10 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[], grp= MEM_callocN(sizeof(bActionGroup), "bActionGroup"); grp->flag = AGRP_SELECTED; - BLI_snprintf(grp->name, 64, group); - + strncpy(grp->name, group, sizeof(grp->name)); + BLI_addtail(&act->groups, grp); - BLI_uniquename(&act->groups, grp, "Group", '.', offsetof(bActionGroup, name), 64); + BLI_uniquename(&act->groups, grp, "Group", '.', offsetof(bActionGroup, name), sizeof(grp->name)); } /* add F-Curve to group */ |