]>
Commit | Line | Data |
---|---|---|
a9440a39 AM |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.3.069 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 6.3.069 | |
11 | Problem: When converting text with illegal characters Vim may crash. | |
12 | Solution: Avoid that too much is subtracted from the length. (Da Woon Jung) | |
13 | Files: src/mbyte.c | |
14 | ||
15 | ||
16 | *** ../vim-6.3.022/src/mbyte.c Thu Oct 7 20:07:59 2004 | |
17 | --- src/mbyte.c Sat Mar 19 18:53:19 2005 | |
18 | *************** | |
19 | *** 3039,3045 **** | |
20 | *to++ = '?'; | |
21 | if ((*mb_ptr2cells)((char_u *)from) > 1) | |
22 | *to++ = '?'; | |
23 | ! l = (*mb_ptr2len_check)((char_u *)from); | |
24 | from += l; | |
25 | fromlen -= l; | |
26 | } | |
27 | --- 3039,3052 ---- | |
28 | *to++ = '?'; | |
29 | if ((*mb_ptr2cells)((char_u *)from) > 1) | |
30 | *to++ = '?'; | |
31 | ! if (enc_utf8) | |
32 | ! l = utfc_ptr2len_check_len((char_u *)from, fromlen); | |
33 | ! else | |
34 | ! { | |
35 | ! l = (*mb_ptr2len_check)((char_u *)from); | |
36 | ! if (l > fromlen) | |
37 | ! l = fromlen; | |
38 | ! } | |
39 | from += l; | |
40 | fromlen -= l; | |
41 | } | |
42 | *** ../vim-6.3.022/src/version.c Thu Mar 24 11:03:11 2005 | |
43 | --- src/version.c Mon Apr 11 11:37:19 2005 | |
44 | *************** | |
45 | *** 643,644 **** | |
46 | --- 643,646 ---- | |
47 | { /* Add new patch number below this line */ | |
48 | + /**/ | |
49 | + 69, | |
50 | /**/ | |
51 | ||
52 | -- | |
53 | hundred-and-one symptoms of being an internet addict: | |
54 | 99. The hum of a cooling fan and the click of keys is comforting to you. | |
55 | ||
56 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
57 | /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
58 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
59 | \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html /// |