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>2012-01-11 16:33:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-11 16:33:51 +0400
commite10fd04db0bdcdbc326fce6cddc8af1179a5de5c (patch)
treea8f3a08b35101e30a0e5d4d1a94e0b2ef50c7122 /source/blender/blenkernel/intern/deform.c
parentdcef7346eb3f16c27b3f952b6452396e66f5e996 (diff)
use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
Diffstat (limited to 'source/blender/blenkernel/intern/deform.c')
-rw-r--r--source/blender/blenkernel/intern/deform.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c
index 6fb4164d6c6..3f3e3b80042 100644
--- a/source/blender/blenkernel/intern/deform.c
+++ b/source/blender/blenkernel/intern/deform.c
@@ -476,22 +476,22 @@ void flip_side_name(char name[MAX_VGROUP_NAME], const char from_name[MAX_VGROUP_
switch(name[0]) {
case 'l':
strcpy(replace, "r");
- strcpy(suffix, name+1);
+ BLI_strncpy(suffix, name+1, sizeof(suffix));
prefix[0]= 0;
break;
case 'r':
strcpy(replace, "l");
- strcpy(suffix, name+1);
+ BLI_strncpy(suffix, name+1, sizeof(suffix));
prefix[0]= 0;
break;
case 'L':
strcpy(replace, "R");
- strcpy(suffix, name+1);
+ BLI_strncpy(suffix, name+1, sizeof(suffix));
prefix[0]= 0;
break;
case 'R':
strcpy(replace, "L");
- strcpy(suffix, name+1);
+ BLI_strncpy(suffix, name+1, sizeof(suffix));
prefix[0]= 0;
break;
}
@@ -501,29 +501,29 @@ void flip_side_name(char name[MAX_VGROUP_NAME], const char from_name[MAX_VGROUP_
index = BLI_strcasestr(prefix, "right");
if (index==prefix || index==prefix+len-5) {
if (index[0]=='r')
- strcpy (replace, "left");
+ strcpy(replace, "left");
else {
if (index[1]=='I')
- strcpy (replace, "LEFT");
+ strcpy(replace, "LEFT");
else
- strcpy (replace, "Left");
+ strcpy(replace, "Left");
}
*index= 0;
- strcpy (suffix, index+5);
+ BLI_strncpy(suffix, index+5, sizeof(suffix));
}
else {
index = BLI_strcasestr(prefix, "left");
if (index==prefix || index==prefix+len-4) {
if (index[0]=='l')
- strcpy (replace, "right");
+ strcpy(replace, "right");
else {
if (index[1]=='E')
- strcpy (replace, "RIGHT");
+ strcpy(replace, "RIGHT");
else
- strcpy (replace, "Right");
+ strcpy(replace, "Right");
}
*index= 0;
- strcpy (suffix, index+4);
+ BLI_strncpy(suffix, index + 4, sizeof(suffix));
}
}
}