]> git.ipfire.org Git - ipfire-3.x.git/blob - vim/patches/vim-7.3.371.patch0
1701c11895820e5aee35b62ef0b2c2f5f8e5f240
[ipfire-3.x.git] / vim / patches / vim-7.3.371.patch0
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.371
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.371
11 Problem: Crash in autocomplete. (Greg Weber)
12 Solution: Check not going over allocated buffer size.
13 Files: src/misc2.c
14
15
16 *** ../vim-7.3.370/src/misc2.c 2011-10-26 11:40:56.000000000 +0200
17 --- src/misc2.c 2011-12-08 17:49:23.000000000 +0100
18 ***************
19 *** 4293,4298 ****
20 --- 4293,4300 ----
21 static int ff_path_in_stoplist __ARGS((char_u *, int, char_u **));
22 #endif
23
24 + static char_u e_pathtoolong[] = N_("E854: path too long for completion");
25 +
26 #if 0
27 /*
28 * if someone likes findfirst/findnext, here are the functions
29 ***************
30 *** 4589,4594 ****
31 --- 4591,4601 ----
32 len = 0;
33 while (*wc_part != NUL)
34 {
35 + if (len + 5 >= MAXPATHL)
36 + {
37 + EMSG(_(e_pathtoolong));
38 + break;
39 + }
40 if (STRNCMP(wc_part, "**", 2) == 0)
41 {
42 ff_expand_buffer[len++] = *wc_part++;
43 ***************
44 *** 4634,4639 ****
45 --- 4641,4652 ----
46 }
47
48 /* create an absolute path */
49 + if (STRLEN(search_ctx->ffsc_start_dir)
50 + + STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL)
51 + {
52 + EMSG(_(e_pathtoolong));
53 + goto error_return;
54 + }
55 STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
56 add_pathsep(ff_expand_buffer);
57 STRCAT(ff_expand_buffer, search_ctx->ffsc_fix_path);
58 *** ../vim-7.3.370/src/version.c 2011-12-08 16:00:12.000000000 +0100
59 --- src/version.c 2011-12-08 17:46:41.000000000 +0100
60 ***************
61 *** 716,717 ****
62 --- 716,719 ----
63 { /* Add new patch number below this line */
64 + /**/
65 + 371,
66 /**/
67
68 --
69 hundred-and-one symptoms of being an internet addict:
70 253. You wait for a slow loading web page before going to the toilet.
71
72 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
73 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
74 \\\ an exciting new programming language -- http://www.Zimbu.org ///
75 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///