1 To: vim_dev@googlegroups.com
2 Subject: Patch 8.0.0078
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Accessing freed memory in quickfix.
12 Solution: Reset pointer when freeing 'errorformat'. (Domenique Pelle)
13 Files: src/quickfix.c, src/testdir/test_quickfix.vim
16 *** ../vim-8.0.0077/src/quickfix.c 2016-11-10 20:01:41.197582893 +0100
17 --- src/quickfix.c 2016-11-12 15:32:55.305622514 +0100
21 int conthere; /* %> used */
24 + static efm_T *fmt_start = NULL; /* cached across qf_parse_line() calls */
26 static int qf_init_ext(qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast, char_u *qf_title);
27 static void qf_store_title(qf_info_T *qi, char_u *title);
28 static void qf_new_list(qf_info_T *qi, char_u *qf_title);
32 vim_regfree(efm_ptr->prog);
38 /* Parse 'errorformat' option */
44 - static efm_T *fmt_start = NULL; /* cached across calls */
49 *** ../vim-8.0.0077/src/testdir/test_quickfix.vim 2016-11-06 14:46:40.644143343 +0100
50 --- src/testdir/test_quickfix.vim 2016-11-12 15:27:04.183936416 +0100
58 + function Test_caddbuffer()
59 + " This used to cause a memory access in freed memory
61 + set efm=%EEEE%m,%WWWW,%+CCCC%>%#,%GGGG%.#
62 + cgetexpr ['WWWW', 'EEEE', 'CCCC']
67 *** ../vim-8.0.0077/src/version.c 2016-11-11 21:57:42.339822540 +0100
68 --- src/version.c 2016-11-12 15:33:58.377207364 +0100
72 { /* Add new patch number below this line */
78 hundred-and-one symptoms of being an internet addict:
79 19. All of your friends have an @ in their names.
81 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
82 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
83 \\\ an exciting new programming language -- http://www.Zimbu.org ///
84 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///