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.102 < prev    next >
Encoding:
Internet Message Format  |  2013-11-20  |  2.1 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.102
  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.102
  11. Problem:    Crash when interrupting "z=".
  12. Solution:   Add safety check for word length. (Christian Brabandt, Dominique
  13.         Pelle)
  14. Files:        src/spell.c
  15.  
  16.  
  17. *** ../vim-7.4.101/src/spell.c    2013-11-14 03:54:02.000000000 +0100
  18. --- src/spell.c    2013-11-21 17:37:04.000000000 +0100
  19. ***************
  20. *** 13398,13406 ****
  21.   
  22.       /* Lookup the word "orgnr" one of the two tries. */
  23.       n = 0;
  24. -     wlen = 0;
  25.       wordcount = 0;
  26. !     for (;;)
  27.       {
  28.           i = 1;
  29.           if (wordcount == orgnr && byts[n + 1] == NUL)
  30. --- 13398,13405 ----
  31.   
  32.       /* Lookup the word "orgnr" one of the two tries. */
  33.       n = 0;
  34.       wordcount = 0;
  35. !     for (wlen = 0; wlen < MAXWLEN - 3; ++wlen)
  36.       {
  37.           i = 1;
  38.           if (wordcount == orgnr && byts[n + 1] == NUL)
  39. ***************
  40. *** 13414,13419 ****
  41. --- 13413,13419 ----
  42.           if (i > byts[n])    /* safety check */
  43.           {
  44.               STRCPY(theword + wlen, "BAD");
  45. +             wlen += 3;
  46.               goto badword;
  47.           }
  48.   
  49. ***************
  50. *** 13426,13432 ****
  51.           wordcount += wc;
  52.           }
  53.   
  54. !         theword[wlen++] = byts[n + i];
  55.           n = idxs[n + i];
  56.       }
  57.   badword:
  58. --- 13426,13432 ----
  59.           wordcount += wc;
  60.           }
  61.   
  62. !         theword[wlen] = byts[n + i];
  63.           n = idxs[n + i];
  64.       }
  65.   badword:
  66. *** ../vim-7.4.101/src/version.c    2013-11-21 17:12:55.000000000 +0100
  67. --- src/version.c    2013-11-21 17:38:21.000000000 +0100
  68. ***************
  69. *** 740,741 ****
  70. --- 740,743 ----
  71.   {   /* Add new patch number below this line */
  72. + /**/
  73. +     102,
  74.   /**/
  75.  
  76. -- 
  77. Engineers will go without food and hygiene for days to solve a problem.
  78. (Other times just because they forgot.)
  79.                 (Scott Adams - The Dilbert principle)
  80.  
  81.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  82. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  83. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  84.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  85.