From 317b649bb241726d8be1a700cd0028f28914595d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 15 Oct 2011 03:56:05 +0000 Subject: fix for buffer overrun with BLI_split_dirfile(...), was simple to do since many places don't check for filename lengyj of 79 chars which is the limit for the file selector. Add max dir and file length args. --- source/blender/blenlib/intern/bpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib/intern/bpath.c') diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index 485b8137a02..4e4f8b3cade 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -400,7 +400,7 @@ static void seq_setpath(struct BPathIterator *bpi, const char *path) if (SEQ_HAS_PATH(seq)) { if (ELEM3(seq->type, SEQ_IMAGE, SEQ_MOVIE, SEQ_SOUND)) { - BLI_split_dirfile(path, seq->strip->dir, seq->strip->stripdata->name); + BLI_split_dirfile(path, seq->strip->dir, seq->strip->stripdata->name, sizeof(seq->strip->dir), sizeof(seq->strip->stripdata->name)); } else { /* simple case */ @@ -903,7 +903,7 @@ void findMissingFiles(Main *bmain, const char *str) //XXX waitcursor( 1 ); - BLI_split_dirfile(str, dirname, NULL); + BLI_split_dirfile(str, dirname, NULL, sizeof(dirname), 0); BLI_bpathIterator_init(&bpi, bmain, bmain->name, 0); -- cgit v1.2.3