diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-10-26 22:04:04 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-10-26 22:04:04 +0200 |
commit | 9ad89c6c4f89cd710d8244d8010b8b0ae30ba79d (patch) | |
tree | 47d4e016c05fa553fd36b0547029372a23475006 /src/misc1.c | |
parent | ce11de87e26e1420703242f8e07b4fd69c4032ba (diff) | |
download | vim-git-9ad89c6c4f89cd710d8244d8010b8b0ae30ba79d.tar.gz |
patch 8.0.1223: crash when using autocomplete and tab pagesv8.0.1223
Problem: Crash when using autocomplete and tab pages.
Solution: Check if the current tab changed. (Christian Brabandt, closes
#2239)
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc1.c b/src/misc1.c index f7789ff79..eb893f6ee 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -2313,7 +2313,8 @@ ins_char_bytes(char_u *buf, int charlen) /* Copy bytes after the changed character(s). */ p = newp + col; - mch_memmove(p + newlen, oldp + col + oldlen, + if (linelen > col + oldlen) + mch_memmove(p + newlen, oldp + col + oldlen, (size_t)(linelen - col - oldlen)); /* Insert or overwrite the new character. */ |