0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 7.4.2223

Problem:    Buffer overflow when using latin1 character with feedkeys().
Solution:   Check for an illegal character.  Add a test.
This commit is contained in:
Bram Moolenaar
2016-08-17 21:32:09 +02:00
parent 6bff02eb53
commit d3c907b5d2
11 changed files with 67 additions and 48 deletions

View File

@@ -4806,7 +4806,7 @@ mch_call_shell(
* round. */
for (p = buffer; p < buffer + len; p += l)
{
l = mb_cptr2len(p);
l = MB_CPTR2LEN(p);
if (l == 0)
l = 1; /* NUL byte? */
else if (MB_BYTE2LEN(*p) != l)