vim-patch:7.4.2223

Problem:    Buffer overflow when using latin1 character with feedkeys().
Solution:   Check for an illegal character.  Add a test.

d3c907b5d2
This commit is contained in:
James McCoy
2017-03-10 17:26:22 -05:00
parent eaf1f9b9dc
commit 2ed2b1d505
8 changed files with 57 additions and 43 deletions

View File

@@ -138,7 +138,7 @@
// Backup multi-byte pointer. Only use with "p" > "s" !
# define mb_ptr_back(s, p) (p -= mb_head_off((char_u *)s, (char_u *)p - 1) + 1)
// get length of multi-byte char, not including composing chars
# define mb_cptr2len(p) utf_ptr2len(p)
# define MB_CPTR2LEN(p) utf_ptr2len(p)
# define MB_COPY_CHAR(f, t) mb_copy_char((const char_u **)(&f), &t);