Mercurial > vim
comparison src/terminal.c @ 13996:59121ffd7fce v8.1.0016
patch 8.1.0016: possible crash in term_wait()
commit https://github.com/vim/vim/commit/d45aa55d42211eb2f42e0a04ff77537a5df51c40
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 21 22:50:29 2018 +0200
patch 8.1.0016: possible crash in term_wait()
Problem: Possible crash in term_wait(). (Dominique Pelle)
Solution: Check for a valid buffer after ui_delay(). (closes https://github.com/vim/vim/issues/2944)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 21 May 2018 23:00:06 +0200 |
parents | 411dd50f1daa |
children | d9fc15c833d5 |
comparison
equal
deleted
inserted
replaced
13995:d854ec09a9a4 | 13996:59121ffd7fce |
---|---|
5262 ch_log(NULL, "term_wait(): waiting for channel to close"); | 5262 ch_log(NULL, "term_wait(): waiting for channel to close"); |
5263 while (buf->b_term != NULL && !buf->b_term->tl_channel_closed) | 5263 while (buf->b_term != NULL && !buf->b_term->tl_channel_closed) |
5264 { | 5264 { |
5265 mch_check_messages(); | 5265 mch_check_messages(); |
5266 parse_queued_messages(); | 5266 parse_queued_messages(); |
5267 ui_delay(10L, FALSE); | |
5267 if (!buf_valid(buf)) | 5268 if (!buf_valid(buf)) |
5268 /* If the terminal is closed when the channel is closed the | 5269 /* If the terminal is closed when the channel is closed the |
5269 * buffer disappears. */ | 5270 * buffer disappears. */ |
5270 break; | 5271 break; |
5271 ui_delay(10L, FALSE); | |
5272 } | 5272 } |
5273 mch_check_messages(); | 5273 mch_check_messages(); |
5274 parse_queued_messages(); | 5274 parse_queued_messages(); |
5275 } | 5275 } |
5276 else | 5276 else |