Mercurial > vim
comparison src/buffer.c @ 11800:5ceaecedbad2 v8.0.0782
patch 8.0.0782: using freed memory in quickfix code
commit https://github.com/vim/vim/commit/d28cc3f55d4a5a980f6ac6fa682382822a223720
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 27 22:03:50 2017 +0200
patch 8.0.0782: using freed memory in quickfix code
Problem: Using freed memory in quickfix code. (Dominique Pelle)
Solution: Handle a help window differently. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 27 Jul 2017 22:15:03 +0200 |
parents | 77bf0346687e |
children | 0cfe4a07c2ad |
comparison
equal
deleted
inserted
replaced
11799:4614433e6af6 | 11800:5ceaecedbad2 |
---|---|
247 msg_silent = old_msg_silent; | 247 msg_silent = old_msg_silent; |
248 #ifdef FEAT_NETBEANS_INTG | 248 #ifdef FEAT_NETBEANS_INTG |
249 netbeansFireChanges = oldFire; | 249 netbeansFireChanges = oldFire; |
250 #endif | 250 #endif |
251 /* Help buffer is filtered. */ | 251 /* Help buffer is filtered. */ |
252 if (curbuf->b_help) | 252 if (bt_help(curbuf)) |
253 fix_help_buffer(); | 253 fix_help_buffer(); |
254 } | 254 } |
255 else if (read_stdin) | 255 else if (read_stdin) |
256 { | 256 { |
257 int save_bin = curbuf->b_p_bin; | 257 int save_bin = curbuf->b_p_bin; |
5667 { | 5667 { |
5668 return buf != NULL && buf->b_p_bt[0] == 't'; | 5668 return buf != NULL && buf->b_p_bt[0] == 't'; |
5669 } | 5669 } |
5670 | 5670 |
5671 /* | 5671 /* |
5672 * Return TRUE if "buf" is a help buffer. | |
5673 */ | |
5674 int | |
5675 bt_help(buf_T *buf) | |
5676 { | |
5677 return buf != NULL && buf->b_help; | |
5678 } | |
5679 | |
5680 /* | |
5672 * Return TRUE if "buf" is a "nofile", "acwrite" or "terminal" buffer. | 5681 * Return TRUE if "buf" is a "nofile", "acwrite" or "terminal" buffer. |
5673 * This means the buffer name is not a file name. | 5682 * This means the buffer name is not a file name. |
5674 */ | 5683 */ |
5675 int | 5684 int |
5676 bt_nofile(buf_T *buf) | 5685 bt_nofile(buf_T *buf) |