To: vim_dev@googlegroups.com Subject: Patch 7.4.1969 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1969 Problem: When the netbeans channel is closed consuming the buffer may cause a crash. Solution: Check for nb_channel not to be NULL. (Xavier de Gaye) Files: src/netbeans.c *** ../vim-7.4.1968/src/netbeans.c 2016-06-08 20:17:17.569243375 +0200 --- src/netbeans.c 2016-07-01 12:48:44.754844715 +0200 *************** *** 422,434 **** buffer = node->rq_buffer; } ! /* now, parse and execute the commands */ nb_parse_cmd(buffer); if (own_node) /* buffer finished, dispose of it */ vim_free(buffer); ! else /* more follows, move it to the start */ channel_consume(nb_channel, PART_SOCK, (int)(p - buffer)); } --- 422,435 ---- buffer = node->rq_buffer; } ! /* Now, parse and execute the commands. This may set nb_channel to ! * NULL if the channel is closed. */ nb_parse_cmd(buffer); if (own_node) /* buffer finished, dispose of it */ vim_free(buffer); ! else if (nb_channel != NULL) /* more follows, move it to the start */ channel_consume(nb_channel, PART_SOCK, (int)(p - buffer)); } *** ../vim-7.4.1968/src/version.c 2016-07-01 11:59:43.177876159 +0200 --- src/version.c 2016-07-01 12:49:45.489949952 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1969, /**/ -- "The question of whether computers can think is just like the question of whether submarines can swim." -- Edsger W. Dijkstra /// 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 ///