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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220520131155.93F2D1C0BB2%40moolenaar.net.

Raspunde prin e-mail lui