|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.402
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.402
|
|
|
22c937 |
Problem: Test 72 crashes under certain conditions. (Kazunobu Kuriyama)
|
|
|
22c937 |
Solution: Clear the whole bufinfo_T early.
|
|
|
22c937 |
Files: src/undo.c
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.401/src/undo.c 2014-08-10 13:34:59.064785459 +0200
|
|
|
22c937 |
--- src/undo.c 2014-08-12 20:08:23.915373819 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 929,935 ****
|
|
|
22c937 |
undo_flush(bi)
|
|
|
22c937 |
bufinfo_T *bi;
|
|
|
22c937 |
{
|
|
|
22c937 |
! if (bi->bi_used > 0)
|
|
|
22c937 |
{
|
|
|
22c937 |
crypt_encode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_used);
|
|
|
22c937 |
if (fwrite(bi->bi_buffer, bi->bi_used, (size_t)1, bi->bi_fp) != 1)
|
|
|
22c937 |
--- 929,935 ----
|
|
|
22c937 |
undo_flush(bi)
|
|
|
22c937 |
bufinfo_T *bi;
|
|
|
22c937 |
{
|
|
|
22c937 |
! if (bi->bi_buffer != NULL && bi->bi_used > 0)
|
|
|
22c937 |
{
|
|
|
22c937 |
crypt_encode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_used);
|
|
|
22c937 |
if (fwrite(bi->bi_buffer, bi->bi_used, (size_t)1, bi->bi_fp) != 1)
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1573,1582 ****
|
|
|
22c937 |
#endif
|
|
|
22c937 |
bufinfo_T bi;
|
|
|
22c937 |
|
|
|
22c937 |
! #ifdef FEAT_CRYPT
|
|
|
22c937 |
! bi.bi_state = NULL;
|
|
|
22c937 |
! bi.bi_buffer = NULL;
|
|
|
22c937 |
! #endif
|
|
|
22c937 |
|
|
|
22c937 |
if (name == NULL)
|
|
|
22c937 |
{
|
|
|
22c937 |
--- 1573,1579 ----
|
|
|
22c937 |
#endif
|
|
|
22c937 |
bufinfo_T bi;
|
|
|
22c937 |
|
|
|
22c937 |
! vim_memset(&bi, 0, sizeof(bi));
|
|
|
22c937 |
|
|
|
22c937 |
if (name == NULL)
|
|
|
22c937 |
{
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1861,1866 ****
|
|
|
22c937 |
--- 1858,1864 ----
|
|
|
22c937 |
#endif
|
|
|
22c937 |
bufinfo_T bi;
|
|
|
22c937 |
|
|
|
22c937 |
+ vim_memset(&bi, 0, sizeof(bi));
|
|
|
22c937 |
if (name == NULL)
|
|
|
22c937 |
{
|
|
|
22c937 |
file_name = u_get_undo_file_name(curbuf->b_ffname, TRUE);
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1905,1914 ****
|
|
|
22c937 |
}
|
|
|
22c937 |
bi.bi_buf = curbuf;
|
|
|
22c937 |
bi.bi_fp = fp;
|
|
|
22c937 |
- #ifdef FEAT_CRYPT
|
|
|
22c937 |
- bi.bi_state = NULL;
|
|
|
22c937 |
- bi.bi_buffer = NULL;
|
|
|
22c937 |
- #endif
|
|
|
22c937 |
|
|
|
22c937 |
/*
|
|
|
22c937 |
* Read the undo file header.
|
|
|
22c937 |
--- 1903,1908 ----
|
|
|
22c937 |
*** ../vim-7.4.401/src/version.c 2014-08-10 16:31:47.376709213 +0200
|
|
|
22c937 |
--- src/version.c 2014-08-12 20:11:13.879372598 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 743,744 ****
|
|
|
22c937 |
--- 743,746 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 402,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
Far back in the mists of ancient time, in the great and glorious days of the
|
|
|
22c937 |
former Galactic Empire, life was wild, rich and largely tax free.
|
|
|
22c937 |
Mighty starships plied their way between exotic suns, seeking adventure and
|
|
|
22c937 |
reward among the furthest reaches of Galactic space. In those days, spirits
|
|
|
22c937 |
were brave, the stakes were high, men were real men, women were real women
|
|
|
22c937 |
and small furry creatures from Alpha Centauri were real small furry creatures
|
|
|
22c937 |
from Alpha Centauri. And all dared to brave unknown terrors, to do mighty
|
|
|
22c937 |
deeds, to boldly split infinitives that no man had split before -- and thus
|
|
|
22c937 |
was the Empire forged.
|
|
|
22c937 |
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|