To: vim_dev@googlegroups.com Subject: Patch 8.0.1657 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1657 Problem: Crash when reading a channel. Solution: Clear the write flag before writing. (idea by Shinya Ohyanagi, closes #2769). Files: src/channel.c *** ../vim-8.0.1656/src/channel.c 2018-03-16 20:46:52.674189967 +0100 --- src/channel.c 2018-04-03 12:49:06.785911816 +0200 *************** *** 4150,4157 **** if (ret > 0 && in_part->ch_fd != INVALID_FD && FD_ISSET(in_part->ch_fd, wfds)) { ! channel_write_input(channel); FD_CLR(in_part->ch_fd, wfds); --ret; } } --- 4150,4158 ---- if (ret > 0 && in_part->ch_fd != INVALID_FD && FD_ISSET(in_part->ch_fd, wfds)) { ! /* Clear the flag first, ch_fd may change in channel_write_input(). */ FD_CLR(in_part->ch_fd, wfds); + channel_write_input(channel); --ret; } } *** ../vim-8.0.1656/src/version.c 2018-04-03 12:17:19.816196268 +0200 --- src/version.c 2018-04-03 12:47:55.310320474 +0200 *************** *** 764,765 **** --- 764,767 ---- { /* Add new patch number below this line */ + /**/ + 1657, /**/ -- I AM THANKFUL... ...for the taxes that I pay because it means that I am employed. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///