]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.406
- new
[packages/vim.git] / 7.2.406
CommitLineData
d1b4bd6a
ER
1To: vim-dev@vim.org
2Subject: Patch 7.2.406
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.2.406
11Problem: Patch 7.2.119 introduces uninit mem read. (Dominique Pelle)
12Solution: Only used ScreeenLinesC when ScreeenLinesUC is not zero. (Yukihiro
13 Nakadaira) Also clear ScreeenLinesC when allocating.
14Files: src/screen.c
15
16
17*** ../vim-7.2.405/src/screen.c 2010-03-23 13:56:53.000000000 +0100
18--- src/screen.c 2010-03-23 15:26:44.000000000 +0100
19***************
20*** 25,34 ****
21 * one character which occupies two display cells.
22 * For UTF-8 a multi-byte character is converted to Unicode and stored in
23 * ScreenLinesUC[]. ScreenLines[] contains the first byte only. For an ASCII
24! * character without composing chars ScreenLinesUC[] will be 0. When the
25! * character occupies two display cells the next byte in ScreenLines[] is 0.
26 * ScreenLinesC[][] contain up to 'maxcombine' composing characters
27! * (drawn on top of the first character). They are 0 when not used.
28 * ScreenLines2[] is only used for euc-jp to store the second byte if the
29 * first byte is 0x8e (single-width character).
30 *
31--- 25,35 ----
32 * one character which occupies two display cells.
33 * For UTF-8 a multi-byte character is converted to Unicode and stored in
34 * ScreenLinesUC[]. ScreenLines[] contains the first byte only. For an ASCII
35! * character without composing chars ScreenLinesUC[] will be 0 and
36! * ScreenLinesC[][] is not used. When the character occupies two display
37! * cells the next byte in ScreenLines[] is 0.
38 * ScreenLinesC[][] contain up to 'maxcombine' composing characters
39! * (drawn on top of the first character). There is 0 after the last one used.
40 * ScreenLines2[] is only used for euc-jp to store the second byte if the
41 * first byte is 0x8e (single-width character).
42 *
43***************
44*** 4893,4898 ****
45--- 4894,4900 ----
46
47 /*
48 * Return if the composing characters at "off_from" and "off_to" differ.
49+ * Only to be used when ScreenLinesUC[off_from] != 0.
50 */
51 static int
52 comp_char_differs(off_from, off_to)
53***************
54*** 6281,6286 ****
55--- 6283,6289 ----
56 /*
57 * Return TRUE if composing characters for screen posn "off" differs from
58 * composing characters in "u8cc".
59+ * Only to be used when ScreenLinesUC[off] != 0.
60 */
61 static int
62 screen_comp_differs(off, u8cc)
63***************
64*** 6461,6468 ****
65 && c == 0x8e
66 && ScreenLines2[off] != ptr[1])
67 || (enc_utf8
68! && (ScreenLinesUC[off] != (u8char_T)(c >= 0x80 ? u8c : 0)
69! || screen_comp_differs(off, u8cc)))
70 #endif
71 || ScreenAttrs[off] != attr
72 || exmode_active;
73--- 6464,6473 ----
74 && c == 0x8e
75 && ScreenLines2[off] != ptr[1])
76 || (enc_utf8
77! && (ScreenLinesUC[off] !=
78! (u8char_T)(c < 0x80 && u8cc[0] == 0 ? 0 : u8c)
79! || (ScreenLinesUC[off] != 0
80! && screen_comp_differs(off, u8cc))))
81 #endif
82 || ScreenAttrs[off] != attr
83 || exmode_active;
84***************
85*** 7542,7548 ****
86 new_ScreenLinesUC = (u8char_T *)lalloc((long_u)(
87 (Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
88 for (i = 0; i < p_mco; ++i)
89! new_ScreenLinesC[i] = (u8char_T *)lalloc((long_u)(
90 (Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
91 }
92 if (enc_dbcs == DBCS_JPNU)
93--- 7547,7553 ----
94 new_ScreenLinesUC = (u8char_T *)lalloc((long_u)(
95 (Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
96 for (i = 0; i < p_mco; ++i)
97! new_ScreenLinesC[i] = (u8char_T *)lalloc_clear((long_u)(
98 (Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
99 }
100 if (enc_dbcs == DBCS_JPNU)
101*** ../vim-7.2.405/src/version.c 2010-03-23 14:39:07.000000000 +0100
102--- src/version.c 2010-03-23 15:34:11.000000000 +0100
103***************
104*** 683,684 ****
105--- 683,686 ----
106 { /* Add new patch number below this line */
107+ /**/
108+ 406,
109 /**/
110
111--
112VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur
113 and his knights seemed hopeless, when, suddenly ... the animator
114 suffered a fatal heart attack.
115ANIMATOR: Aaaaagh!
116VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
117 continue.
118 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
119
120 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
121/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
122\\\ download, build and distribute -- http://www.A-A-P.org ///
123 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.036903 seconds and 4 git commands to generate.