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>2011-12-22 01:40:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-22 01:40:21 +0400
commit0772ebc02c8f0800d501ee8a7f5be01ddb01c026 (patch)
tree838e8fc6337d4b24b2da050c5223e235e024346a /source/blender/blenkernel/intern/ipo.c
parent840dfcd56d132cf71e0d43978a28c3f19aa57826 (diff)
fix for use of uninitialized value for ipo conversion.
Diffstat (limited to 'source/blender/blenkernel/intern/ipo.c')
-rw-r--r--source/blender/blenkernel/intern/ipo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 622ec093a3f..9890a2629fc 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -909,8 +909,10 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
if (array_index)
*array_index= dummy_index;
}
-
+
+ /* 'buf' _must_ be initialized in this block */
/* append preceding bits to path */
+ /* note, strings are not escapted and they should be! */
if ((actname && actname[0]) && (constname && constname[0])) {
/* Constraint in Pose-Channel */
sprintf(buf, "pose.bones[\"%s\"].constraints[\"%s\"]", actname, constname);
@@ -918,6 +920,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
else if (actname && actname[0]) {
if ((blocktype == ID_OB) && strcmp(actname, "Object")==0) {
/* Actionified "Object" IPO's... no extra path stuff needed */
+ buf[0]= '\0'; /* empty string */
}
else if ((blocktype == ID_KE) && strcmp(actname, "Shape")==0) {
/* Actionified "Shape" IPO's - these are forced onto object level via the action container there... */
@@ -936,8 +939,10 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
/* Sequence names in Scene */
sprintf(buf, "sequence_editor.sequences_all[\"%s\"]", seq->name+2);
}
- else
+ else {
buf[0]= '\0'; /* empty string */
+ }
+
BLI_dynstr_append(path, buf);
/* need to add dot before property if there was anything precceding this */