comparison src/terminal.c @ 12881:1c05b29ab125 v8.0.1317

patch 8.0.1317: accessing freed memory in term_wait() commit https://github.com/vim/vim/commit/e518226713784e628ae7ee077f1b66cb12b9ffd9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 19 15:05:44 2017 +0100 patch 8.0.1317: accessing freed memory in term_wait() Problem: Accessing freed memory in term_wait(). (Dominique Pelle) Solution: Check that the buffer still exists.
author Christian Brabandt <cb@256bit.org>
date Sun, 19 Nov 2017 15:15:05 +0100
parents ebb4f6c93598
children 40ae30bc2691
comparison
equal deleted inserted replaced
12880:ad5cbf9fba6b 12881:1c05b29ab125
3225 ch_log(NULL, "term_wait(): waiting for channel to close"); 3225 ch_log(NULL, "term_wait(): waiting for channel to close");
3226 while (buf->b_term != NULL && !buf->b_term->tl_channel_closed) 3226 while (buf->b_term != NULL && !buf->b_term->tl_channel_closed)
3227 { 3227 {
3228 mch_check_messages(); 3228 mch_check_messages();
3229 parse_queued_messages(); 3229 parse_queued_messages();
3230 if (!buf_valid(buf))
3231 /* If the terminal is closed when the channel is closed the
3232 * buffer disappears. */
3233 break;
3230 ui_delay(10L, FALSE); 3234 ui_delay(10L, FALSE);
3231 } 3235 }
3232 mch_check_messages(); 3236 mch_check_messages();
3233 parse_queued_messages(); 3237 parse_queued_messages();
3234 } 3238 }