]> git.pld-linux.org Git - packages/vim.git/blame - 7.0.127
- updated to 0.7.3
[packages/vim.git] / 7.0.127
CommitLineData
f3c378e8
AG
1To: vim-dev@vim.org
2Subject: Patch 7.0.127
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.0.127
11Problem: Crash when swap files has invalid timestamp.
12Solution: Check return value of ctime() for being NULL.
13Files: src/memline.c
14
15
16*** ../vim-7.0.126/src/memline.c Tue Aug 29 17:28:56 2006
17--- src/memline.c Tue Oct 10 16:19:56 2006
18***************
19*** 1633,1638 ****
20--- 1633,1639 ----
21 int fd;
22 struct block0 b0;
23 time_t x = (time_t)0;
24+ char *p;
25 #ifdef UNIX
26 char_u uname[B0_UNAME_SIZE];
27 #endif
28***************
29*** 1652,1659 ****
30 #endif
31 MSG_PUTS(_(" dated: "));
32 x = st.st_mtime; /* Manx C can't do &st.st_mtime */
33! MSG_PUTS(ctime(&x)); /* includes '\n' */
34!
35 }
36
37 /*
38--- 1653,1663 ----
39 #endif
40 MSG_PUTS(_(" dated: "));
41 x = st.st_mtime; /* Manx C can't do &st.st_mtime */
42! p = ctime(&x); /* includes '\n' */
43! if (p == NULL)
44! MSG_PUTS("(invalid)\n");
45! else
46! MSG_PUTS(p);
47 }
48
49 /*
50***************
51*** 3652,3657 ****
52--- 3656,3662 ----
53 {
54 struct stat st;
55 time_t x, sx;
56+ char *p;
57
58 ++no_wait_return;
59 (void)EMSG(_("E325: ATTENTION"));
60***************
61*** 3666,3672 ****
62 {
63 MSG_PUTS(_(" dated: "));
64 x = st.st_mtime; /* Manx C can't do &st.st_mtime */
65! MSG_PUTS(ctime(&x));
66 if (sx != 0 && x > sx)
67 MSG_PUTS(_(" NEWER than swap file!\n"));
68 }
69--- 3671,3681 ----
70 {
71 MSG_PUTS(_(" dated: "));
72 x = st.st_mtime; /* Manx C can't do &st.st_mtime */
73! p = ctime(&x); /* includes '\n' */
74! if (p == NULL)
75! MSG_PUTS("(invalid)\n");
76! else
77! MSG_PUTS(p);
78 if (sx != 0 && x > sx)
79 MSG_PUTS(_(" NEWER than swap file!\n"));
80 }
81*** ../vim-7.0.126/src/version.c Tue Oct 10 15:49:41 2006
82--- src/version.c Tue Oct 10 16:18:51 2006
83***************
84*** 668,669 ****
85--- 668,671 ----
86 { /* Add new patch number below this line */
87+ /**/
88+ 127,
89 /**/
90
91--
92How To Keep A Healthy Level Of Insanity:
9317. When the money comes out the ATM, scream "I won!, I won! 3rd
94 time this week!!!!!"
95
96 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
97/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
98\\\ download, build and distribute -- http://www.A-A-P.org ///
99 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.033026 seconds and 4 git commands to generate.