Patch 8.2.1089
Problem: Coverity warns for pointer computation.
Solution: Avoid computing a pointer to invalid memory.
Files: src/spellfile.c
*** ../vim-8.2.1088/src/spellfile.c 2020-06-03 22:15:41.331159342 +0200
--- src/spellfile.c 2020-06-29 21:54:20.697433098 +0200
***************
*** 5908,5914 ****
spin.si_newcompID = 127; // start compound ID at first maximum
// default: fnames[0] is output file, following are input files
! innames = &fnames[1];
incount = fcount - 1;
wfname = alloc(MAXPATHL);
--- 5908,5915 ----
spin.si_newcompID = 127; // start compound ID at first maximum
// default: fnames[0] is output file, following are input files
! // When "fcount" is 1 there is only one file.
! innames = &fnames[fcount == 1 ? 0 : 1];
incount = fcount - 1;
wfname = alloc(MAXPATHL);
***************
*** 5922,5935 ****
{
// For ":mkspell path/en.latin1.add" output file is
// "path/en.latin1.add.spl".
- innames = &fnames[0];
incount = 1;
vim_snprintf((char *)wfname, MAXPATHL, "%s.spl", fnames[0]);
}
else if (fcount == 1)
{
// For ":mkspell path/vim" output file is "path/vim.latin1.spl".
- innames = &fnames[0];
incount = 1;
vim_snprintf((char *)wfname, MAXPATHL, SPL_FNAME_TMPL,
fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc());
--- 5923,5934 ----
*** ../vim-8.2.1088/src/version.c 2020-06-29 21:32:03.278898255 +0200
--- src/version.c 2020-06-29 22:24:29.853294031 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1089,
/**/
--
A fool must search for a greater fool to find admiration.
/// Bram Moolenaar -- Br...@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 ///