]> git.pld-linux.org Git - packages/vim.git/blob - 7.0.200
- updated to 1.15
[packages/vim.git] / 7.0.200
1 To: vim-dev@vim.org
2 Subject: patch 7.0.200
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 7.0.200
11 Problem:    Memory leaks when out of memory.
12 Solution:   Free the memory.
13 Files:      src/edit.c, src/diff.c
14
15
16 *** ../vim-7.0.199/src/edit.c   Tue Feb 20 03:33:51 2007
17 --- src/edit.c  Fri Feb 16 01:15:49 2007
18 ***************
19 *** 2698,2703 ****
20 --- 2698,2704 ----
21       buf = alloc(LSIZE);
22       if (buf == NULL)
23         return;
24 +     regmatch.regprog = NULL;  /* so that we can goto theend */
25   
26       /* If 'infercase' is set, don't use 'smartcase' here */
27       save_p_scs = p_scs;
28 ***************
29 *** 2712,2724 ****
30         char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
31   
32         if (pat_esc == NULL)
33 !           return ;
34         i = (int)STRLEN(pat_esc) + 10;
35         ptr = alloc(i);
36         if (ptr == NULL)
37         {
38             vim_free(pat_esc);
39 !           return;
40         }
41         vim_snprintf((char *)ptr, i, "^\\s*\\zs\\V%s", pat_esc);
42         regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
43 --- 2713,2725 ----
44         char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
45   
46         if (pat_esc == NULL)
47 !           goto theend ;
48         i = (int)STRLEN(pat_esc) + 10;
49         ptr = alloc(i);
50         if (ptr == NULL)
51         {
52             vim_free(pat_esc);
53 !           goto theend;
54         }
55         vim_snprintf((char *)ptr, i, "^\\s*\\zs\\V%s", pat_esc);
56         regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
57 *** ../vim-7.0.199/src/diff.c   Sun Apr 23 00:23:34 2006
58 --- src/diff.c  Fri Feb 16 01:18:41 2007
59 ***************
60 *** 1822,1835 ****
61 --- 1822,1841 ----
62   
63       idx = diff_buf_idx(wp->w_buffer);
64       if (idx == DB_COUNT)      /* cannot happen */
65 +     {
66 +       vim_free(line_org);
67         return FALSE;
68 +     }
69   
70       /* search for a change that includes "lnum" in the list of diffblocks. */
71       for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
72         if (lnum <= dp->df_lnum[idx] + dp->df_count[idx])
73             break;
74       if (dp == NULL || diff_check_sanity(curtab, dp) == FAIL)
75 +     {
76 +       vim_free(line_org);
77         return FALSE;
78 +     }
79   
80       off = lnum - dp->df_lnum[idx];
81   
82 *** ../vim-7.0.199/src/version.c        Tue Feb 20 03:33:51 2007
83 --- src/version.c       Tue Feb 20 03:48:16 2007
84 ***************
85 *** 668,669 ****
86 --- 668,671 ----
87   {   /* Add new patch number below this line */
88 + /**/
89 +     200,
90   /**/
91
92 -- 
93 hundred-and-one symptoms of being an internet addict:
94 157. You fum through a magazine, you first check to see if it has a web
95      address.
96
97  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
98 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
99 \\\        download, build and distribute -- http://www.A-A-P.org        ///
100  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.029791 seconds and 3 git commands to generate.