4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Reading freed memory when writing ":reg" output to a register.
13 Solution: Skip the register being written to.
17 *** ../vim-7.2.296/src/ops.c 2009-11-11 17:22:30.000000000 +0100
18 --- src/ops.c 2009-11-11 19:30:47.000000000 +0100
27 + if (name == MB_TOLOWER(redir_reg)
28 + || (redir_reg == '"' && yb == y_previous))
29 + continue; /* do not list register being written to, the
30 + * pointer can be freed */
33 if (yb->y_array != NULL)
41 ! if (y_ptr->y_array == NULL) /* NULL means emtpy register */
49 ! if (y_ptr->y_array == NULL) /* NULL means empty register */
53 *** ../vim-7.2.296/src/version.c 2009-11-17 12:31:30.000000000 +0100
54 --- src/version.c 2009-11-17 12:42:28.000000000 +0100
58 { /* Add new patch number below this line */
64 "Beware of bugs in the above code; I have only proved
65 it correct, not tried it." -- Donald Knuth
67 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
68 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
69 \\\ download, build and distribute -- http://www.A-A-P.org ///
70 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///