To: vim-dev@vim.org Subject: Patch 7.2b.028 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.2b.028 Problem: Reading uninitialized memory when doing ":gui -f". (Dominique Pelle) Solution: Don't position the cursor when the screen size is invalid. Files: src/gui.c *** ../vim-7.2b.027/src/gui.c Sun Jul 13 19:15:11 2008 --- src/gui.c Sun Jul 27 21:32:14 2008 *************** *** 901,909 **** int attr; attrentry_T *aep = NULL; ! /* Don't update the cursor when halfway busy scrolling. ! * ScreenLines[] isn't valid then. */ ! if (!can_update_cursor) return; gui_check_pos(); --- 901,910 ---- int attr; attrentry_T *aep = NULL; ! /* Don't update the cursor when halfway busy scrolling or the screen size ! * doesn't match 'columns' and 'lines. ScreenLines[] isn't valid then. */ ! if (!can_update_cursor || screen_Columns != gui.num_cols ! || screen_Rows != gui.num_rows) return; gui_check_pos(); *** ../vim-7.2b.027/src/version.c Wed Aug 6 14:18:37 2008 --- src/version.c Wed Aug 6 14:35:51 2008 *************** *** 678,679 **** --- 678,681 ---- { /* Add new patch number below this line */ + /**/ + 28, /**/ -- An indication you must be a manager: You believe you never have any problems in your life, just "issues" and "improvement opportunities". /// 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 ///