mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1169: write NUL past allocated space using corrupted spell file
Problem: Write NUL past allocated space using corrupted spell file. (Markus Vervier) Solution: Init "c" every time.
This commit is contained in:
@@ -993,7 +993,6 @@ read_sal_section(FILE *fd, slang_T *slang)
|
||||
salitem_T *smp;
|
||||
int ccnt;
|
||||
char_u *p;
|
||||
int c = NUL;
|
||||
|
||||
slang->sl_sofo = FALSE;
|
||||
|
||||
@@ -1017,6 +1016,8 @@ read_sal_section(FILE *fd, slang_T *slang)
|
||||
// <sal> : <salfromlen> <salfrom> <saltolen> <salto>
|
||||
for (; gap->ga_len < cnt; ++gap->ga_len)
|
||||
{
|
||||
int c = NUL;
|
||||
|
||||
smp = &((salitem_T *)gap->ga_data)[gap->ga_len];
|
||||
ccnt = getc(fd); // <salfromlen>
|
||||
if (ccnt < 0)
|
||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1169,
|
||||
/**/
|
||||
1168,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user