Blame SOURCES/7.4.629

d6ba96
To: vim_dev@googlegroups.com
d6ba96
Subject: Patch 7.4.629
d6ba96
Fcc: outbox
d6ba96
From: Bram Moolenaar <Bram@moolenaar.net>
d6ba96
Mime-Version: 1.0
d6ba96
Content-Type: text/plain; charset=UTF-8
d6ba96
Content-Transfer-Encoding: 8bit
d6ba96
------------
d6ba96
d6ba96
Patch 7.4.629
d6ba96
Problem:    Coverity warning for Out-of-bounds read.
d6ba96
Solution:   Increase MAXWLEN to 254. (Eliseo Martínez)
d6ba96
Files:	    src/spell.c
d6ba96
d6ba96
d6ba96
*** ../vim-7.4.628/src/spell.c	2014-11-19 16:38:01.512679964 +0100
d6ba96
--- src/spell.c	2015-02-10 20:00:22.188514910 +0100
d6ba96
***************
d6ba96
*** 311,319 ****
d6ba96
  # include <time.h>	/* for time_t */
d6ba96
  #endif
d6ba96
  
d6ba96
! #define MAXWLEN 250		/* Assume max. word len is this many bytes.
d6ba96
  				   Some places assume a word length fits in a
d6ba96
! 				   byte, thus it can't be above 255. */
d6ba96
  
d6ba96
  /* Type used for indexes in the word tree need to be at least 4 bytes.  If int
d6ba96
   * is 8 bytes we could use something smaller, but what? */
d6ba96
--- 311,320 ----
d6ba96
  # include <time.h>	/* for time_t */
d6ba96
  #endif
d6ba96
  
d6ba96
! #define MAXWLEN 254		/* Assume max. word len is this many bytes.
d6ba96
  				   Some places assume a word length fits in a
d6ba96
! 				   byte, thus it can't be above 255.
d6ba96
! 				   Must be >= PFD_NOTSPECIAL. */
d6ba96
  
d6ba96
  /* Type used for indexes in the word tree need to be at least 4 bytes.  If int
d6ba96
   * is 8 bytes we could use something smaller, but what? */
d6ba96
*** ../vim-7.4.628/src/version.c	2015-02-10 19:26:58.918748560 +0100
d6ba96
--- src/version.c	2015-02-10 20:01:27.475662030 +0100
d6ba96
***************
d6ba96
*** 743,744 ****
d6ba96
--- 743,746 ----
d6ba96
  {   /* Add new patch number below this line */
d6ba96
+ /**/
d6ba96
+     629,
d6ba96
  /**/
d6ba96
d6ba96
-- 
d6ba96
I noticed my daughter's Disney-net password on a sticky note:
d6ba96
"MickeyMinnieGoofyPluto".  I asked her why it was so long.
d6ba96
"Because they say it has to have at least four characters."
d6ba96
d6ba96
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
d6ba96
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
d6ba96
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
d6ba96
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///