Fix potential buffer overflow (found by Cyril Brulebois).
authorKen Hughes <khughes@pacific.edu>
Mon, 5 May 2008 00:42:18 +0000 (00:42 +0000)
committerKen Hughes <khughes@pacific.edu>
Mon, 5 May 2008 00:42:18 +0000 (00:42 +0000)
source/blender/src/sequence.c

index 0da5775c9e3906bf2ae79c0b4ebe674ec5a76961..b4d3a6c3ce24ddb0a052799ac2368c8e2705cb6a 100644 (file)
@@ -1709,7 +1709,7 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
                        StripElem * s_elem = give_stripelem(seq, cfra);
                        
                        strncpy(name, seq->strip->dir, FILE_MAXDIR-1);
-                       strncat(name, s_elem->name, FILE_MAXFILE);
+                       strncat(name, s_elem->name, FILE_MAXFILE-1);
                        BLI_convertstringcode(name, G.sce);
                        BLI_convertstringframe(name, G.scene->r.cfra);
                        if (!build_proxy_run) {