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 / old / 5.4.24 < prev    next >
Encoding:
Internet Message Format  |  1999-08-11  |  3.3 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 5.4.24
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. This is an important one.  Brad lost a file because of this bug.
  8.  
  9.  
  10. Patch 5.4.24
  11. Problem:    Encryption: When using ":r file" while 'key' has already entered,
  12.         the 'key' option would be messed up.  When writing the file it
  13.         would be encrypted with an unknown key and lost! (Brad Despres)
  14. Solution:   Don't free cryptkey when it is equal to the 'key' option.
  15. Files:        src/fileio.c
  16.  
  17.  
  18. *** ../vim-5.4.23/src/fileio.c    Tue Aug 10 16:09:10 1999
  19. --- src/fileio.c    Thu Aug 12 22:16:54 1999
  20. ***************
  21. *** 533,543 ****
  22.                   cryptkey = curbuf->b_p_key;
  23.               else
  24.               {
  25.                   cryptkey = get_crypt_key(newfile);
  26.                   /* check if empty key entered */
  27.                   if (cryptkey != NULL && *cryptkey == NUL)
  28.                   {
  29. !                 if (!newfile)
  30.                       vim_free(cryptkey);
  31.                   cryptkey = NULL;
  32.                   }
  33. --- 533,545 ----
  34.                   cryptkey = curbuf->b_p_key;
  35.               else
  36.               {
  37. +                 /* When newfile is TRUE, store the typed key in
  38. +                  * the 'key' option and don't free it. */
  39.                   cryptkey = get_crypt_key(newfile);
  40.                   /* check if empty key entered */
  41.                   if (cryptkey != NULL && *cryptkey == NUL)
  42.                   {
  43. !                 if (cryptkey != curbuf->b_p_key)
  44.                       vim_free(cryptkey);
  45.                   cryptkey = NULL;
  46.                   }
  47. ***************
  48. *** 793,799 ****
  49.       if (newfile)
  50.       curbuf->b_start_ffc = *curbuf->b_p_ff;    /* remember 'fileformat' */
  51.   #ifdef CRYPTV
  52. !     else
  53.       vim_free(cryptkey);
  54.   #endif
  55.   
  56. --- 795,801 ----
  57.       if (newfile)
  58.       curbuf->b_start_ffc = *curbuf->b_p_ff;    /* remember 'fileformat' */
  59.   #ifdef CRYPTV
  60. !     if (cryptkey != curbuf->b_p_key)
  61.       vim_free(cryptkey);
  62.   #endif
  63.   
  64. *** ../vim-5.4.23/src/version.h    Wed Aug 11 23:19:48 1999
  65. --- src/version.h    Thu Aug 12 22:21:37 1999
  66. ***************
  67. *** 19,26 ****
  68.   #define VIM_VERSION_MINOR_STR        "4"
  69.   #define VIM_VERSION_BUILD         57
  70.   #define VIM_VERSION_BUILD_STR        "57"
  71. ! #define VIM_VERSION_PATCHLEVEL         23
  72. ! #define VIM_VERSION_PATCHLEVEL_STR    "23"
  73.   
  74.   /*
  75.    * VIM_VERSION_NODOT is used for the runtime directory name.
  76. --- 19,26 ----
  77.   #define VIM_VERSION_MINOR_STR        "4"
  78.   #define VIM_VERSION_BUILD         57
  79.   #define VIM_VERSION_BUILD_STR        "57"
  80. ! #define VIM_VERSION_PATCHLEVEL         24
  81. ! #define VIM_VERSION_PATCHLEVEL_STR    "24"
  82.   
  83.   /*
  84.    * VIM_VERSION_NODOT is used for the runtime directory name.
  85. ***************
  86. *** 30,35 ****
  87.    */
  88.   #define VIM_VERSION_NODOT    "vim54"
  89.   #define VIM_VERSION_SHORT    "5.4"
  90. ! #define VIM_VERSION_MEDIUM    "5.4.23"
  91. ! #define VIM_VERSION_LONG    "VIM - Vi IMproved 5.4.23 (1999 Aug 11)"
  92. ! #define VIM_VERSION_LONG_DATE    "VIM - Vi IMproved 5.4.23 (1999 Aug 11, compiled "
  93. --- 30,35 ----
  94.    */
  95.   #define VIM_VERSION_NODOT    "vim54"
  96.   #define VIM_VERSION_SHORT    "5.4"
  97. ! #define VIM_VERSION_MEDIUM    "5.4.24"
  98. ! #define VIM_VERSION_LONG    "VIM - Vi IMproved 5.4.24 (1999 Aug 12)"
  99. ! #define VIM_VERSION_LONG_DATE    "VIM - Vi IMproved 5.4.24 (1999 Aug 12, compiled "
  100.  
  101. --
  102. hundred-and-one symptoms of being an internet addict:
  103. 67. Your hard drive crashes. You haven't logged in for two hours.  You start
  104.     to twitch. You pick up the phone and manually dial your ISP's access
  105.     number. You try to hum to communicate with the modem.  You succeed.
  106.  
  107. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  108.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  109.