4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Patch 7.2.119 introduces uninit mem read. (Dominique Pelle)
12 Solution: Only used ScreeenLinesC when ScreeenLinesUC is not zero. (Yukihiro
13 Nakadaira) Also clear ScreeenLinesC when allocating.
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
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).
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).
48 * Return if the composing characters at "off_from" and "off_to" differ.
49 + * Only to be used when ScreenLinesUC[off_from] != 0.
52 comp_char_differs(off_from, off_to)
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.
62 screen_comp_differs(off, u8cc)
66 && ScreenLines2[off] != ptr[1])
68 ! && (ScreenLinesUC[off] != (u8char_T)(c >= 0x80 ? u8c : 0)
69 ! || screen_comp_differs(off, u8cc)))
71 || ScreenAttrs[off] != attr
75 && ScreenLines2[off] != ptr[1])
77 ! && (ScreenLinesUC[off] !=
78 ! (u8char_T)(c < 0x80 && u8cc[0] == 0 ? 0 : u8c)
79 ! || (ScreenLinesUC[off] != 0
80 ! && screen_comp_differs(off, u8cc))))
82 || ScreenAttrs[off] != attr
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);
92 if (enc_dbcs == DBCS_JPNU)
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);
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
106 { /* Add new patch number below this line */
112 VOICE 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.
116 VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
118 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
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 ///