diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-15 16:26:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-15 16:26:48 +0400 |
commit | 0d355a8a2ccaeb54a1f723fd5adacec76d08c921 (patch) | |
tree | ff3b24f061960689c8fea73e074594f2603bf159 /source/blender/blenkernel/intern | |
parent | 9648c6016b35a72aa23395f5d200e342df16490b (diff) |
replace BLI_strncpy with BLI_strncpy_utf8 where input isnt ensured to be valid.
also replace strcpy's which copy using "" with str[0]='\0'
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 0d3f3cc5ae4..5acd6c169a0 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -942,7 +942,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co sprintf(buf, "sequence_editor.sequences_all[\"%s\"]", seq->name+2); } else - strcpy(buf, ""); /* empty string */ + buf[0]= '\0'; /* empty string */ BLI_dynstr_append(path, buf); /* need to add dot before property if there was anything precceding this */ diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index c2b561b122a..3644b02e7b5 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -418,7 +418,7 @@ void unlink_object(Object *ob) for (ct= targets.first; ct; ct= ct->next) { if (ct->tar == ob) { ct->tar = NULL; - strcpy(ct->subtarget, ""); + ct->subtarget[0]= '\0'; obt->recalc |= OB_RECALC_DATA; } } @@ -448,7 +448,7 @@ void unlink_object(Object *ob) for (ct= targets.first; ct; ct= ct->next) { if (ct->tar == ob) { ct->tar = NULL; - strcpy(ct->subtarget, ""); + ct->subtarget[0]= '\0'; obt->recalc |= OB_RECALC_DATA; } } |