diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-09 22:16:26 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-09 22:16:26 +0300 |
commit | 8f75b67c0733f09b8bc1d99235eb3231abc6500c (patch) | |
tree | 1ea6e84f8ff3abe101c82093769bd7d7665c5121 /src | |
parent | ecce981dba367d61be170b535083691dd9c40cd2 (diff) | |
download | rneovim-8f75b67c0733f09b8bc1d99235eb3231abc6500c.tar.gz rneovim-8f75b67c0733f09b8bc1d99235eb3231abc6500c.tar.bz2 rneovim-8f75b67c0733f09b8bc1d99235eb3231abc6500c.zip |
coverity/13688: Check for NUL bytes in salfrom
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/spellfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c index 97a82582c0..8756bee21c 100644 --- a/src/nvim/spellfile.c +++ b/src/nvim/spellfile.c @@ -1157,8 +1157,8 @@ static int read_sal_section(FILE *fd, slang_T *slang) if (i < ccnt) // store the char we got while checking for end of sm_lead *p++ = c; - for (++i; i < ccnt; ++i) - *p++ = getc(fd); // <salfrom> + SPELL_READ_NONNUL_BYTES((char *)p, (size_t)ccnt, fd); // <salfrom> + p += ccnt; *p++ = NUL; // <saltolen> <salto> |