From c1b829f2c941e8c27f910e27d066047bc93e1416 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Nov 22 2006 10:11:16 +0000 Subject: - patchlevel 168 --- diff --git a/7.0.168 b/7.0.168 new file mode 100644 index 0000000..b4bf838 --- /dev/null +++ b/7.0.168 @@ -0,0 +1,68 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.168 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.168 +Problem: Using uninitialized memory and memory leak. (Dominique Pelle) +Solution: Use alloc_clear() instead of alloc() for w_lines. Free + b_ml.ml_stack after recovery. +Files: src/memline.c, src/window.c + + +*** ../vim-7.0.167/src/memline.c Wed Nov 1 18:10:36 2006 +--- src/memline.c Thu Nov 16 22:29:19 2006 +*************** +*** 1329,1334 **** +--- 1329,1335 ---- + mf_put(mfp, hp, FALSE, FALSE); + mf_close(mfp, FALSE); /* will also vim_free(mfp->mf_fname) */ + } ++ vim_free(buf->b_ml.ml_stack); + vim_free(buf); + if (serious_error && called_from_main) + ml_close(curbuf, TRUE); +*** ../vim-7.0.167/src/window.c Tue Oct 24 21:15:09 2006 +--- src/window.c Thu Nov 16 22:24:51 2006 +*************** +*** 4273,4279 **** + win_T *wp; + { + wp->w_lines_valid = 0; +! wp->w_lines = (wline_T *)alloc((unsigned)(Rows * sizeof(wline_T))); + if (wp->w_lines == NULL) + return FAIL; + return OK; +--- 4273,4279 ---- + win_T *wp; + { + wp->w_lines_valid = 0; +! wp->w_lines = (wline_T *)alloc_clear((unsigned)(Rows * sizeof(wline_T))); + if (wp->w_lines == NULL) + return FAIL; + return OK; +*** ../vim-7.0.167/src/version.c Tue Nov 21 19:36:00 2006 +--- src/version.c Tue Nov 21 20:34:13 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 168, + /**/ + +-- + GALAHAD turns back. We see from his POV the lovely ZOOT standing by him + smiling enchantingly and a number of equally delectable GIRLIES draped + around in the seductively poulticed room. They look at him smilingly and + wave. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/README.patches b/README.patches index 9c32e3e..ec66aa3 100644 --- a/README.patches +++ b/README.patches @@ -194,3 +194,7 @@ Individual patches for Vim 7.0: 5819 7.0.162 doesn't exit with "vim -o a b" and abort at ATTENTION prompt 4306 7.0.163 can't get the position of a sign over the netbeans interface 1518 7.0.164 ":redir @+" doesn't work + 2284 7.0.165 using CTRL-L to add to a search pattern fails for some chars + 1865 7.0.166 crash with cscope when a file descriptor is NULL + 1942 7.0.167 can't redefine a function in a dictionary + 2224 7.0.168 reading uninitialized memory and a memory leak in recovery