commit | ec3cfeb19988dbeb4cfb27e735f3905149f79169 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Wed Oct 03 17:12:47 2012 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Wed Oct 03 17:12:47 2012 +0200 |
tree | 3a8839fb682d9d5f7b89104169412c4726a34116 | |
parent | 1e91f2606b2380e6e443e7389f7648d86fb8c654 [diff] [blame] |
updated for version 7.3.675 Problem: Using uninitialized memory with very long file name. Solution: Put NUL after text when it is truncated. (ZyX)
diff --git a/src/buffer.c b/src/buffer.c index 0a2ce8e..5998523 100644 --- a/src/buffer.c +++ b/src/buffer.c
@@ -3058,7 +3058,7 @@ *p++ = '"'; if (buf_spname(curbuf) != NULL) - STRCPY(p, buf_spname(curbuf)); + vim_strncpy(p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1); else { if (!fullname && curbuf->b_fname != NULL)