commit | 9c2b06637b32742cac11bfd66b1a4e84583c6c2e | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Sep 01 19:56:15 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Sep 01 19:56:15 2020 +0200 |
tree | 6f193fe923afd59dd8ac369bd58e9ae32fc06ae2 | |
parent | ca563b9b948aec18463c26e9f87ae7933571b40e [diff] [blame] |
patch 8.2.1560: using NULL pointers in some code Problem: Using NULL pointers in some code. (James McCoy) Solution: Avoid adding to a NULL pointer. Use byte as unsigned.
diff --git a/src/spellfile.c b/src/spellfile.c index 6aeac86..d5ec3fe 100644 --- a/src/spellfile.c +++ b/src/spellfile.c
@@ -816,7 +816,7 @@ // read the length bytes, MSB first for (i = 0; i < cnt_bytes; ++i) - cnt = (cnt << 8) + getc(fd); + cnt = (cnt << 8) + (unsigned)getc(fd); if (cnt < 0) { *cntp = SP_TRUNCERROR;