]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.044
- new
[packages/vim.git] / 7.2.044
CommitLineData
65bfde4c
AG
1To: vim-dev@vim.org
2Subject: Patch 7.2.044
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.2.044
11Problem: Crash because of STRCPY() being over protective of the destination
12 size. (Dominique Pelle)
13Solution: Add -D_FORTIFY_SOURCE=1 to CFLAGS. Use an intermediate variable
14 for the pointer to avoid a warning.
15Files: src/auto/configure, src/configure.in, src/eval.c
16
17
18*** ../vim-7.2.043/src/auto/configure Thu Jul 24 17:20:50 2008
19--- src/auto/configure Sun Nov 16 17:08:44 2008
20***************
21*** 16819,16839 ****
22 LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
23 fi
24
25- { $as_echo "$as_me:$LINENO: checking for GCC 3 or later" >&5
26- $as_echo_n "checking for GCC 3 or later... " >&6; }
27 DEPEND_CFLAGS_FILTER=
28 if test "$GCC" = yes; then
29 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'`
30 if test "$gccmajor" -gt "2"; then
31 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
32! fi
33! fi
34! if test "$DEPEND_CFLAGS_FILTER" = ""; then
35! { $as_echo "$as_me:$LINENO: result: no" >&5
36 $as_echo "no" >&6; }
37! else
38! { $as_echo "$as_me:$LINENO: result: yes" >&5
39 $as_echo "yes" >&6; }
40 fi
41
42
43--- 16819,16847 ----
44 LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
45 fi
46
47 DEPEND_CFLAGS_FILTER=
48 if test "$GCC" = yes; then
49+ { $as_echo "$as_me:$LINENO: checking for GCC 3 or later" >&5
50+ $as_echo_n "checking for GCC 3 or later... " >&6; }
51 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'`
52 if test "$gccmajor" -gt "2"; then
53 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
54! { $as_echo "$as_me:$LINENO: result: yes" >&5
55! $as_echo "yes" >&6; }
56! else
57! { $as_echo "$as_me:$LINENO: result: no" >&5
58 $as_echo "no" >&6; }
59! fi
60! { $as_echo "$as_me:$LINENO: checking whether we need -D_FORTIFY_SOURCE=1" >&5
61! $as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
62! if test "$gccmajor" -gt "3"; then
63! CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=1"
64! { $as_echo "$as_me:$LINENO: result: yes" >&5
65 $as_echo "yes" >&6; }
66+ else
67+ { $as_echo "$as_me:$LINENO: result: no" >&5
68+ $as_echo "no" >&6; }
69+ fi
70 fi
71
72
73*** ../vim-7.2.043/src/configure.in Thu Jul 24 17:20:31 2008
74--- src/configure.in Sun Nov 16 17:08:40 2008
75***************
76*** 3152,3169 ****
77 dnl But only when making dependencies, cproto and lint don't take "-isystem".
78 dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow
79 dnl the number before the version number.
80- AC_MSG_CHECKING(for GCC 3 or later)
81 DEPEND_CFLAGS_FILTER=
82 if test "$GCC" = yes; then
83 gccmajor=`echo "$gccversion" | sed -e 's/^\([[1-9]]\)\..*$/\1/g'`
84 if test "$gccmajor" -gt "2"; then
85 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
86 fi
87- fi
88- if test "$DEPEND_CFLAGS_FILTER" = ""; then
89- AC_MSG_RESULT(no)
90- else
91- AC_MSG_RESULT(yes)
92 fi
93 AC_SUBST(DEPEND_CFLAGS_FILTER)
94
95--- 3152,3176 ----
96 dnl But only when making dependencies, cproto and lint don't take "-isystem".
97 dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow
98 dnl the number before the version number.
99 DEPEND_CFLAGS_FILTER=
100 if test "$GCC" = yes; then
101+ AC_MSG_CHECKING(for GCC 3 or later)
102 gccmajor=`echo "$gccversion" | sed -e 's/^\([[1-9]]\)\..*$/\1/g'`
103 if test "$gccmajor" -gt "2"; then
104 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
105+ AC_MSG_RESULT(yes)
106+ else
107+ AC_MSG_RESULT(no)
108+ fi
109+ dnl -D_FORTIFY_SOURCE=2 crashes Vim on strcpy(buf, "000") when buf is
110+ dnl declared as char x[1] but actually longer. Introduced in gcc 4.0.
111+ AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
112+ if test "$gccmajor" -gt "3"; then
113+ CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=1"
114+ AC_MSG_RESULT(yes)
115+ else
116+ AC_MSG_RESULT(no)
117 fi
118 fi
119 AC_SUBST(DEPEND_CFLAGS_FILTER)
120
121*** ../vim-7.2.043/src/eval.c Wed Nov 12 15:28:37 2008
122--- src/eval.c Sun Nov 16 20:46:28 2008
123***************
124*** 21150,21157 ****
125 init_var_dict(&fc.l_avars, &fc.l_avars_var);
126 add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "0",
127 (varnumber_T)(argcount - fp->uf_args.ga_len));
128 v = &fc.fixvar[fixvar_idx++].var;
129! STRCPY(v->di_key, "000");
130 v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
131 hash_add(&fc.l_avars.dv_hashtab, DI2HIKEY(v));
132 v->di_tv.v_type = VAR_LIST;
133--- 21150,21160 ----
134 init_var_dict(&fc.l_avars, &fc.l_avars_var);
135 add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "0",
136 (varnumber_T)(argcount - fp->uf_args.ga_len));
137+ /* Use "name" to avoid a warning from some compiler that checks the
138+ * destination size. */
139 v = &fc.fixvar[fixvar_idx++].var;
140! name = v->di_key;
141! STRCPY(name, "000");
142 v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
143 hash_add(&fc.l_avars.dv_hashtab, DI2HIKEY(v));
144 v->di_tv.v_type = VAR_LIST;
145*** ../vim-7.2.043/src/version.c Thu Nov 20 10:26:19 2008
146--- src/version.c Thu Nov 20 10:34:31 2008
147***************
148*** 678,679 ****
149--- 678,681 ----
150 { /* Add new patch number below this line */
151+ /**/
152+ 44,
153 /**/
154
155--
156Error:015 - Unable to exit Windows. Try the door.
157
158 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
159/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
160\\\ download, build and distribute -- http://www.A-A-P.org ///
161 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.049225 seconds and 4 git commands to generate.