From 8f75b67c0733f09b8bc1d99235eb3231abc6500c Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 9 Apr 2017 22:16:26 +0300 Subject: coverity/13688: Check for NUL bytes in salfrom --- src/nvim/spellfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); // + SPELL_READ_NONNUL_BYTES((char *)p, (size_t)ccnt, fd); // + p += ccnt; *p++ = NUL; // -- cgit