summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-04 20:29:53 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-04 20:29:53 +0200
commit8e5eece8c5f22a2235edeb743d06253f6c54cfdc (patch)
tree7fe1e0beec3672563bdeaefcc09c17babedbafae
parenteb44a68b42eda207a5bc4def9ea8fc4d38acb650 (diff)
downloadvim-8e5eece8c5f22a2235edeb743d06253f6c54cfdc.zip
patch 8.0.0859: NULL pointer access when term_free_vterm called twice
Problem: NULL pointer access when term_free_vterm called twice. Solution: Return when tl_vterm is NULL. (Yasuhiro Matsumoto, closes #1934)
-rw-r--r--src/terminal.c5
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c
index a4120b39c..893cd0f1b 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -691,8 +691,11 @@ move_terminal_to_buffer(term_T *term)
VTermPos pos;
VTermScreenCell cell;
VTermScreenCell *p;
- VTermScreen *screen = vterm_obtain_screen(term->tl_vterm);
+ VTermScreen *screen;
+ if (term->tl_vterm == NULL)
+ return;
+ screen = vterm_obtain_screen(term->tl_vterm);
for (pos.row = 0; pos.row < term->tl_rows; ++pos.row)
{
len = 0;
diff --git a/src/version.c b/src/version.c
index e50eeaf63..a5e02a1a7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 859,
+/**/
858,
/**/
857,