1
0
forked from aniani/vim

patch 8.2.4833: failure of mapping not checked for

Problem:    Failure of mapping not checked for.
Solution:   Check return value of ins_typebuf(). (closes #10299)
This commit is contained in:
zeertzjq
2022-04-27 11:58:01 +01:00
committed by Bram Moolenaar
parent fc78a0369e
commit 12e21e387b
4 changed files with 24 additions and 5 deletions

View File

@@ -4531,7 +4531,9 @@ put_string_in_typebuf(
del_typebuf(-extra, offset);
else if (extra > 0)
// insert the extra space we need
ins_typebuf(string + slen, REMAP_YES, offset, FALSE, FALSE);
if (ins_typebuf(string + slen, REMAP_YES, offset, FALSE, FALSE)
== FAIL)
return FAIL;
// Careful: del_typebuf() and ins_typebuf() may have reallocated
// typebuf.tb_buf[]!