fix for crash if image names are too long in adding image strips to the sequencer.

This commit is contained in:
2010-07-08 17:00:06 +00:00
parent aff6b6885f
commit b441a22bc8

View File

@@ -459,7 +459,9 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
se= strip->stripdata;
RNA_BEGIN(op->ptr, itemptr, "files") {
RNA_string_get(&itemptr, "name", se->name);
char *filename= RNA_string_get_alloc(&itemptr, "name", NULL, 0);
BLI_strncpy(se->name, filename, sizeof(se->name));
MEM_freeN(filename);
se++;
}
RNA_END;