1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Setting 'statusline' to "%!'asdf%' reads uninitialized memory.
12 Solution: Check for NUL after %.
16 *** ../vim-7.3.111/src/buffer.c 2010-10-27 16:17:56.000000000 +0200
17 --- src/buffer.c 2011-02-01 21:40:17.000000000 +0100
20 * or truncated if too long, fillchar is used for all whitespace.
23 ! build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, tabtab)
25 char_u *out; /* buffer to write into != NameBuff */
26 size_t outlen; /* length of out[] */
28 * or truncated if too long, fillchar is used for all whitespace.
31 ! build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar,
32 ! maxwidth, hltab, tabtab)
34 char_u *out; /* buffer to write into != NameBuff */
35 size_t outlen; /* length of out[] */
39 * Handle one '%' item.
42 + if (*s == NUL) /* ignore trailing % */
46 if (p + 1 >= out + outlen)
47 *** ../vim-7.3.111/src/version.c 2011-02-01 18:01:06.000000000 +0100
48 --- src/version.c 2011-02-01 21:54:01.000000000 +0100
52 { /* Add new patch number below this line */
58 Rule #1: Don't give somebody a tool that he's going to hurt himself with.
60 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
61 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
62 \\\ an exciting new programming language -- http://www.Zimbu.org ///
63 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///