To: vim_dev@googlegroups.com Subject: Patch 8.2.4985 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4985 Problem: PVS warns for possible array underrun. Solution: Add a check for a positive value. (closes #10451) Files: src/spell.c *** ../vim-8.2.4984/src/spell.c 2022-05-13 12:41:39.465488943 +0100 --- src/spell.c 2022-05-20 14:10:13.764928843 +0100 *************** *** 253,259 **** MAXWLEN + 1); mi.mi_fwordlen = (int)STRLEN(mi.mi_fword); ! if (camel_case) // Introduce a fake word end space into the folded word. mi.mi_fword[mi.mi_fwordlen - 1] = ' '; --- 253,259 ---- MAXWLEN + 1); mi.mi_fwordlen = (int)STRLEN(mi.mi_fword); ! if (camel_case && mi.mi_fwordlen > 0) // Introduce a fake word end space into the folded word. mi.mi_fword[mi.mi_fwordlen - 1] = ' '; *** ../vim-8.2.4984/src/version.c 2022-05-20 13:45:55.845397175 +0100 --- src/version.c 2022-05-20 14:10:36.128929731 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4985, /**/ -- hundred-and-one symptoms of being an internet addict: 241. You try to look for Net Search even when you're in File Manager. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///