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-02-13 06:21:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-13 06:21:27 +0300
commit867fc4b463ef39ea16103f18f332c3d259624d29 (patch)
tree7d20c416241afb7b878b767a9955e284d3cddbe2 /source/blender/editors/space_sequencer
parent9e03a0d4762b4734fe7ccb20e03b4a3c8f939620 (diff)
enforce string limits (reported by pedantic checking tools & some developers).
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf(). also fix possible crash if CWD isnt available.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index c1e01e2ac53..24142e0b898 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -315,7 +315,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
RNA_BEGIN(op->ptr, itemptr, "files") {
RNA_string_get(&itemptr, "name", file_only);
- BLI_join_dirfile(seq_load.path, dir_only, file_only);
+ BLI_join_dirfile(seq_load.path, sizeof(seq_load.path), dir_only, file_only);
seq= seq_load_func(C, ed->seqbasep, &seq_load);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 47dff6face4..505b38147f7 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1060,8 +1060,7 @@ void seq_remap_paths(Scene *scene)
BLI_strncpy(stripped, seq->strip->dir + strlen(from), FILE_MAX);
/* new path */
- BLI_strncpy(seq->strip->dir, to, FILE_MAX);
- strcat(seq->strip->dir, stripped);
+ BLI_snprintf(seq->strip->dir, sizeof(seq->strip->dir), "%s%s", to, stripped);
printf("new %s\n", seq->strip->dir);
}
}