Karsten Hopp 4ac89d
To: vim-dev@vim.org
Karsten Hopp 4ac89d
Subject: Patch 7.1.143
Karsten Hopp 4ac89d
Fcc: outbox
Karsten Hopp 4ac89d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 4ac89d
Mime-Version: 1.0
Karsten Hopp 4ac89d
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 4ac89d
Content-Transfer-Encoding: 8bit
Karsten Hopp 4ac89d
------------
Karsten Hopp 4ac89d
Karsten Hopp 4ac89d
Patch 7.1.143
Karsten Hopp 4ac89d
Problem:    Uninitialized memory read when diffing three files. (Dominique
Karsten Hopp 4ac89d
	    Pelle)
Karsten Hopp 4ac89d
Solution:   Remove "+ !notset" so that we don't use fields that were not
Karsten Hopp 4ac89d
	    computed.
Karsten Hopp 4ac89d
Files:	    src/diff.c
Karsten Hopp 4ac89d
Karsten Hopp 4ac89d
Karsten Hopp 4ac89d
*** ../vim-7.1.142/src/diff.c	Sat Sep 29 14:15:00 2007
Karsten Hopp 4ac89d
--- src/diff.c	Sun Oct 14 21:52:56 2007
Karsten Hopp 4ac89d
***************
Karsten Hopp 4ac89d
*** 1310,1316 ****
Karsten Hopp 4ac89d
  		    dp->df_count[idx_new] += -off;
Karsten Hopp 4ac89d
  		off = 0;
Karsten Hopp 4ac89d
  	    }
Karsten Hopp 4ac89d
! 	    for (i = idx_orig; i < idx_new + !notset; ++i)
Karsten Hopp 4ac89d
  		if (curtab->tp_diffbuf[i] != NULL)
Karsten Hopp 4ac89d
  		    dp->df_count[i] = dpl->df_lnum[i] + dpl->df_count[i]
Karsten Hopp 4ac89d
  						       - dp->df_lnum[i] + off;
Karsten Hopp 4ac89d
--- 1310,1316 ----
Karsten Hopp 4ac89d
  		    dp->df_count[idx_new] += -off;
Karsten Hopp 4ac89d
  		off = 0;
Karsten Hopp 4ac89d
  	    }
Karsten Hopp 4ac89d
! 	    for (i = idx_orig; i < idx_new; ++i)
Karsten Hopp 4ac89d
  		if (curtab->tp_diffbuf[i] != NULL)
Karsten Hopp 4ac89d
  		    dp->df_count[i] = dpl->df_lnum[i] + dpl->df_count[i]
Karsten Hopp 4ac89d
  						       - dp->df_lnum[i] + off;
Karsten Hopp 4ac89d
*** ../vim-7.1.142/src/version.c	Fri Oct 19 16:20:09 2007
Karsten Hopp 4ac89d
--- src/version.c	Fri Oct 19 17:32:18 2007
Karsten Hopp 4ac89d
***************
Karsten Hopp 4ac89d
*** 668,669 ****
Karsten Hopp 4ac89d
--- 668,671 ----
Karsten Hopp 4ac89d
  {   /* Add new patch number below this line */
Karsten Hopp 4ac89d
+ /**/
Karsten Hopp 4ac89d
+     143,
Karsten Hopp 4ac89d
  /**/
Karsten Hopp 4ac89d
Karsten Hopp 4ac89d
-- 
Karsten Hopp 4ac89d
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 4ac89d
37. You start looking for hot HTML addresses in public restrooms.
Karsten Hopp 4ac89d
Karsten Hopp 4ac89d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 4ac89d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 4ac89d
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 4ac89d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///