summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-27 11:58:01 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-27 11:58:01 +0100
commit12e21e387b5bbc928097abf1c189b7dc665838fc (patch)
tree71ec4c8aa2bb205ec22780ba1ed687b17f600287 /src/term.c
parentfc78a0369e0d371a1a85d07045ff25d8695e8f8c (diff)
downloadvim-git-12e21e387b5bbc928097abf1c189b7dc665838fc.tar.gz
patch 8.2.4833: failure of mapping not checked forv8.2.4833
Problem: Failure of mapping not checked for. Solution: Check return value of ins_typebuf(). (closes #10299)
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c
index 14cee6ac2..ee8be7f8f 100644
--- a/src/term.c
+++ b/src/term.c
@@ -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[]!