Skip to content

Commit

Permalink
patch 8.0.0859: NULL pointer access when term_free_vterm called twice
Browse files Browse the repository at this point in the history
Problem:    NULL pointer access when term_free_vterm called twice.
Solution:   Return when tl_vterm is NULL. (Yasuhiro Matsumoto, closes #1934)
  • Loading branch information
brammool committed Aug 4, 2017
1 parent eb44a68 commit 8e5eece
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/terminal.c
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -769,6 +769,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
859,
/**/
858,
/**/
Expand Down

0 comments on commit 8e5eece

Please sign in to comment.