summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0593
blob: 512995fa186c895a61fe1819ed208de971ed7abe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0593
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0593
Problem:    Illegal memory access in libvterm test.
Solution:   Fix off-by-one error.
Files:	    src/libvterm/src/vterm.c, src/libvterm/Makefile,
            src/libvterm/t/run-test.pl


*** ../vim-8.1.0592/src/libvterm/src/vterm.c	2018-04-24 18:23:45.000000000 +0200
--- src/libvterm/src/vterm.c	2018-12-15 14:43:48.466327193 +0100
***************
*** 169,177 ****
  #else
    written = vsprintf(buffer, format, args);
  
!   if(written >= (int)(vt->outbuffer_len - vt->outbuffer_cur)) {
      /* output was truncated */
!     written = vt->outbuffer_len - vt->outbuffer_cur;
    }
    if (written > 0)
    {
--- 169,177 ----
  #else
    written = vsprintf(buffer, format, args);
  
!   if(written >= (int)(vt->outbuffer_len - vt->outbuffer_cur - 1)) {
      /* output was truncated */
!     written = vt->outbuffer_len - vt->outbuffer_cur - 1;
    }
    if (written > 0)
    {
*** ../vim-8.1.0592/src/libvterm/Makefile	2018-12-15 14:24:34.293210452 +0100
--- src/libvterm/Makefile	2018-12-15 14:46:36.649289986 +0100
***************
*** 52,57 ****
--- 52,60 ----
  MANDIR=$(PREFIX)/share/man
  MAN3DIR=$(MANDIR)/man3
  
+ # Uncomment to check for memory access errors with valgrind.
+ # VALGRIND=1
+ 
  all: $(LIBRARY) $(BINFILES)
  
  $(LIBRARY): $(OBJECTS)
*** ../vim-8.1.0592/src/libvterm/t/run-test.pl	2017-06-24 16:44:02.000000000 +0200
--- src/libvterm/t/run-test.pl	2018-12-15 14:38:07.328417529 +0100
***************
*** 16,22 ****
  {
     local $ENV{LD_LIBRARY_PATH} = ".libs";
     my @command = "t/.libs/harness";
!    unshift @command, "valgrind", "--quiet", "--error-exitcode=126" if $VALGRIND;
  
     $hpid = open2 $hout, $hin, @command or die "Cannot open2 harness - $!";
  }
--- 16,22 ----
  {
     local $ENV{LD_LIBRARY_PATH} = ".libs";
     my @command = "t/.libs/harness";
!    unshift @command, "valgrind", "--tool=memcheck", "--leak-check=yes", "--num-callers=25", "--log-file=valgrind.out", "--error-exitcode=126" if $VALGRIND;
  
     $hpid = open2 $hout, $hin, @command or die "Cannot open2 harness - $!";
  }
*** ../vim-8.1.0592/src/version.c	2018-12-15 14:24:34.293210452 +0100
--- src/version.c	2018-12-15 14:45:09.285829163 +0100
***************
*** 801,802 ****
--- 801,804 ----
  {   /* Add new patch number below this line */
+ /**/
+     593,
  /**/

-- 
The Feynman problem solving Algorithm:
	1) Write down the problem
	2) Think real hard
	3) Write down the answer

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///