]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.156
- new: 7.3.271
[packages/vim.git] / 7.3.156
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.156
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.156
11 Problem:    Tty names possibly left unterminated.
12 Solution:   Use vim_strncpy() instead of strncpy().
13 Files:      src/pty.c
14
15
16 *** ../vim-7.3.155/src/pty.c    2010-08-15 21:57:28.000000000 +0200
17 --- src/pty.c   2011-04-11 14:02:49.000000000 +0200
18 ***************
19 *** 209,216 ****
20   #ifdef _SEQUENT_
21       fvhangup(s);
22   #endif
23 !     strncpy(PtyName, m, sizeof(PtyName));
24 !     strncpy(TtyName, s, sizeof(TtyName));
25       initmaster(f);
26       *ttyn = TtyName;
27       return f;
28 --- 209,216 ----
29   #ifdef _SEQUENT_
30       fvhangup(s);
31   #endif
32 !     vim_strncpy((char_u *)PtyName, (char_u *)m, sizeof(PtyName) - 1);
33 !     vim_strncpy((char_u *)TtyName, (char_u *)s, sizeof(TtyName) - 1);
34       initmaster(f);
35       *ttyn = TtyName;
36       return f;
37 ***************
38 *** 301,307 ****
39         return -1;
40       }
41       signal(SIGCHLD, sigcld);
42 !     strncpy(TtyName, m, sizeof(TtyName));
43       initmaster(f);
44       *ttyn = TtyName;
45       return f;
46 --- 301,307 ----
47         return -1;
48       }
49       signal(SIGCHLD, sigcld);
50 !     vim_strncpy((char_u *)TtyName, (char_u *)m, sizeof(TtyName) - 1);
51       initmaster(f);
52       *ttyn = TtyName;
53       return f;
54 ***************
55 *** 326,332 ****
56       /* a dumb looking loop replaced by mycrofts code: */
57       if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0)
58         return -1;
59 !     strncpy(TtyName, ttyname(f), sizeof(TtyName));
60       if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK))
61       {
62         close(f);
63 --- 326,332 ----
64       /* a dumb looking loop replaced by mycrofts code: */
65       if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0)
66         return -1;
67 !     vim_strncpy((char_u *)TtyName, (char_u *)ttyname(f), sizeof(TtyName) - 1);
68       if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK))
69       {
70         close(f);
71 *** ../vim-7.3.155/src/version.c        2011-04-11 13:46:07.000000000 +0200
72 --- src/version.c       2011-04-11 14:23:38.000000000 +0200
73 ***************
74 *** 716,717 ****
75 --- 716,719 ----
76   {   /* Add new patch number below this line */
77 + /**/
78 +     156,
79   /**/
80
81 -- 
82 I think that you'll agree that engineers are very effective in their social
83 interactions.  It's the "normal" people who are nuts.
84                                 (Scott Adams - The Dilbert principle)
85
86  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
87 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
88 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
89  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.029679 seconds and 3 git commands to generate.