home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 5.7.029 < prev    next >
Encoding:
Internet Message Format  |  2001-04-23  |  2.1 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 5.7.029
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.7.029
  8. Problem:    Editing a file with an extremely long name crashed Vim.
  9. Solution:   Check for length of the name when setting the window title.
  10. Files:        src/buffer.c
  11.  
  12.  
  13. *** ../vim-5.7.28/src/buffer.c    Wed Jun  7 19:11:48 2000
  14. --- src/buffer.c    Tue Apr 24 10:16:54 2001
  15. ***************
  16. *** 2035,2043 ****
  17.               }
  18.           }
  19.           }
  20.           *t_str = NUL;
  21. -         while (*t_name)
  22. -         STRCAT(t_str, transchar(*t_name++));
  23.       }
  24.       }
  25.       mustset = ti_change(t_str, &lasttitle);
  26. --- 2035,2046 ----
  27.               }
  28.           }
  29.           }
  30. +         while (*t_name && t_str < buf + IOSIZE - 5)
  31. +         {
  32. +         STRCPY(t_str, transchar(*t_name++));
  33. +         t_str += STRLEN(t_str);
  34. +         }
  35.           *t_str = NUL;
  36.       }
  37.       }
  38.       mustset = ti_change(t_str, &lasttitle);
  39. ***************
  40. *** 2060,2068 ****
  41.           i_name = (char_u *)"No File";
  42.           else            /* use file name only in icon */
  43.           i_name = gettail(curbuf->b_ffname);
  44.           *i_str = NUL;
  45. -         while (*i_name)
  46. -         STRCAT(i_str, transchar(*i_name++));
  47.       }
  48.       }
  49.   
  50. --- 2063,2074 ----
  51.           i_name = (char_u *)"No File";
  52.           else            /* use file name only in icon */
  53.           i_name = gettail(curbuf->b_ffname);
  54. +         while (*i_name && i_str < buf + IOSIZE - 5)
  55. +         {
  56. +         STRCPY(i_str, transchar(*i_name++));
  57. +         i_str += STRLEN(i_str);
  58. +         }
  59.           *i_str = NUL;
  60.       }
  61.       }
  62.   
  63. *** ../vim-5.7.28/src/version.c    Tue Apr  3 11:57:10 2001
  64. --- src/version.c    Tue Apr 24 10:18:46 2001
  65. ***************
  66. *** 439,440 ****
  67. --- 439,442 ----
  68.   {   /* Add new patch number below this line */
  69. + /**/
  70. +     29,
  71.   /**/
  72.  
  73. -- 
  74. MORTICIAN:    Bring out your dead!
  75.               [clang]
  76.               Bring out your dead!
  77.               [clang]
  78.               Bring out your dead!
  79. CUSTOMER:     Here's one -- nine pence.
  80. DEAD PERSON:  I'm not dead!
  81.                                   The Quest for the Holy Grail (Monty Python)
  82.  
  83.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  84. (((   Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim   )))
  85.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  86.