To: vim_dev@googlegroups.com Subject: Patch 8.2.1169 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1169 Problem: Write NUL past allocated space using corrupted spell file. (Markus Vervier) Solution: Init "c" every time. Files: src/spellfile.c *** ../vim-8.2.1168/src/spellfile.c 2020-06-29 22:24:53.205181859 +0200 --- src/spellfile.c 2020-07-10 19:55:56.444946946 +0200 *************** *** 993,999 **** salitem_T *smp; int ccnt; char_u *p; - int c = NUL; slang->sl_sofo = FALSE; --- 993,998 ---- *************** *** 1017,1022 **** --- 1016,1023 ---- // : for (; gap->ga_len < cnt; ++gap->ga_len) { + int c = NUL; + smp = &((salitem_T *)gap->ga_data)[gap->ga_len]; ccnt = getc(fd); // if (ccnt < 0) *** ../vim-8.2.1168/src/version.c 2020-07-09 22:53:27.361738186 +0200 --- src/version.c 2020-07-10 19:57:10.896611296 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1169, /**/ -- Never enter the boss's office unless it's absolutely necessary. Every boss saves one corner of the desk for useless assignments that are doled out like Halloween candy to each visitor. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///