home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.402 < prev    next >
Encoding:
Internet Message Format  |  2014-08-12  |  2.9 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.402
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.402
  11. Problem:    Test 72 crashes under certain conditions. (Kazunobu Kuriyama)
  12. Solution:   Clear the whole bufinfo_T early.
  13. Files:        src/undo.c
  14.  
  15.  
  16. *** ../vim-7.4.401/src/undo.c    2014-08-10 13:34:59.064785459 +0200
  17. --- src/undo.c    2014-08-12 20:08:23.915373819 +0200
  18. ***************
  19. *** 929,935 ****
  20.   undo_flush(bi)
  21.       bufinfo_T    *bi;
  22.   {
  23. !     if (bi->bi_used > 0)
  24.       {
  25.       crypt_encode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_used);
  26.       if (fwrite(bi->bi_buffer, bi->bi_used, (size_t)1, bi->bi_fp) != 1)
  27. --- 929,935 ----
  28.   undo_flush(bi)
  29.       bufinfo_T    *bi;
  30.   {
  31. !     if (bi->bi_buffer != NULL && bi->bi_used > 0)
  32.       {
  33.       crypt_encode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_used);
  34.       if (fwrite(bi->bi_buffer, bi->bi_used, (size_t)1, bi->bi_fp) != 1)
  35. ***************
  36. *** 1573,1582 ****
  37.   #endif
  38.       bufinfo_T    bi;
  39.   
  40. ! #ifdef FEAT_CRYPT
  41. !     bi.bi_state = NULL;
  42. !     bi.bi_buffer = NULL;
  43. ! #endif
  44.   
  45.       if (name == NULL)
  46.       {
  47. --- 1573,1579 ----
  48.   #endif
  49.       bufinfo_T    bi;
  50.   
  51. !     vim_memset(&bi, 0, sizeof(bi));
  52.   
  53.       if (name == NULL)
  54.       {
  55. ***************
  56. *** 1861,1866 ****
  57. --- 1858,1864 ----
  58.   #endif
  59.       bufinfo_T    bi;
  60.   
  61. +     vim_memset(&bi, 0, sizeof(bi));
  62.       if (name == NULL)
  63.       {
  64.       file_name = u_get_undo_file_name(curbuf->b_ffname, TRUE);
  65. ***************
  66. *** 1905,1914 ****
  67.       }
  68.       bi.bi_buf = curbuf;
  69.       bi.bi_fp = fp;
  70. - #ifdef FEAT_CRYPT
  71. -     bi.bi_state = NULL;
  72. -     bi.bi_buffer = NULL;
  73. - #endif
  74.   
  75.       /*
  76.        * Read the undo file header.
  77. --- 1903,1908 ----
  78. *** ../vim-7.4.401/src/version.c    2014-08-10 16:31:47.376709213 +0200
  79. --- src/version.c    2014-08-12 20:11:13.879372598 +0200
  80. ***************
  81. *** 743,744 ****
  82. --- 743,746 ----
  83.   {   /* Add new patch number below this line */
  84. + /**/
  85. +     402,
  86.   /**/
  87.  
  88. -- 
  89. Far back in the mists of ancient time, in the great and glorious days of the
  90. former Galactic Empire, life was wild, rich and largely tax free.
  91. Mighty starships plied their way between exotic suns, seeking adventure and
  92. reward among the furthest reaches of Galactic space.  In those days, spirits
  93. were brave, the stakes were high, men were real men, women were real women
  94. and small furry creatures from Alpha Centauri were real small furry creatures
  95. from Alpha Centauri.  And all dared to brave unknown terrors, to do mighty
  96. deeds, to boldly split infinitives that no man had split before -- and thus
  97. was the Empire forged.
  98.         -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
  99.  
  100.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  101. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  102. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  103.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  104.