Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-27 23:52:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-27 23:52:50 +0400
commitd1f4827a40aaf19ad7bcac2c86c9dc4e52dea733 (patch)
tree708df691aaf5e58b4adeb8e2b6cfc08a17507cf6
parente2e487a877b87e0e5dd43d8198f4171b247162cd (diff)
IK plugin range check was wrong, could do out of bounds reads.
-rw-r--r--source/blender/editors/armature/armature_relations.c4
-rw-r--r--source/blender/ikplugin/intern/ikplugin_api.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 7ed7ebbb4b9..d5dbe80538f 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -468,8 +468,8 @@ static int separate_armature_exec(bContext *C, wmOperator *UNUSED(op))
/* TODO: use context iterators for this? */
CTX_DATA_BEGIN(C, Base *, base, visible_bases)
{
- if (base->object == obedit) base->flag |= 1;
- else base->flag &= ~1;
+ if (base->object == obedit) base->flag |= SELECT;
+ else base->flag &= ~SELECT;
}
CTX_DATA_END;
diff --git a/source/blender/ikplugin/intern/ikplugin_api.c b/source/blender/ikplugin/intern/ikplugin_api.c
index 507d54d7526..2ca50afb0f2 100644
--- a/source/blender/ikplugin/intern/ikplugin_api.c
+++ b/source/blender/ikplugin/intern/ikplugin_api.c
@@ -86,12 +86,13 @@ static IKPlugin ikplugin_tab[] = {
static IKPlugin *get_plugin(bPose *pose)
{
- if (!pose || pose->iksolver < 0 || pose->iksolver > (sizeof(ikplugin_tab) / sizeof(IKPlugin) - 2))
+ if (!pose || pose->iksolver < 0 || pose->iksolver >= ((sizeof(ikplugin_tab) / sizeof(IKPlugin)) - 1))
return NULL;
return &ikplugin_tab[pose->iksolver];
}
+
/*----------------------------------------*/
/* Plugin API */