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 / 6.0.018 < prev    next >
Encoding:
Internet Message Format  |  2001-10-20  |  1.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.018
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.018
  11. Problem:    Initializing 'encoding' may cause a crash when setlocale() is not
  12.         used. (Dany St-Amant)
  13. Solution:   Check for a NULL pointer.
  14. Files:        src/mbyte.c
  15.  
  16.  
  17. *** ../vim60.17/src/mbyte.c    Wed Sep 26 16:18:24 2001
  18. --- src/mbyte.c    Sun Oct 21 12:39:21 2001
  19. ***************
  20. *** 2317,2324 ****
  21.   #endif
  22.   
  23.   /*
  24. !  * Return the default value for 'encoding' in an allocated string.
  25. !  * Returns NULL when out of memory or no usable default could be found.
  26.    */
  27.       int
  28.   enc_default()
  29. --- 2317,2324 ----
  30.   #endif
  31.   
  32.   /*
  33. !  * Set the default value for 'encoding' (p_enc).
  34. !  * Returns OK when successful, FAIL when not.
  35.    */
  36.       int
  37.   enc_default()
  38. ***************
  39. *** 2349,2354 ****
  40. --- 2349,2357 ----
  41.           if ((s = getenv("LC_ALL")) == NULL || *s == NUL)
  42.           if ((s = getenv("LC_CTYPE")) == NULL || *s == NUL)
  43.               s = getenv("LANG");
  44. +     if (s == NULL || *s == NUL)
  45. +     return FAIL;
  46.   
  47.       /* The most generic locale format is:
  48.        * language[_territory][.codeset][@modifier][+special][,[sponsor][_revision]]
  49. *** ../vim60.17/src/version.c    Sun Oct 21 12:38:02 2001
  50. --- src/version.c    Sun Oct 21 12:35:28 2001
  51. ***************
  52. *** 608,609 ****
  53. --- 608,611 ----
  54.   {   /* Add new patch number below this line */
  55. + /**/
  56. +     18,
  57.   /**/
  58.  
  59. -- 
  60. hundred-and-one symptoms of being an internet addict:
  61. 139. You down your lunch in five minutes, at your desk, so you can
  62.      spend the rest of the hour surfing the Net.
  63.  
  64.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  65. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  66.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  67.