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 / 6.0.178 < prev    next >
Encoding:
Internet Message Format  |  2002-02-03  |  4.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.178
  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 6.0.178
  11. Problem:    Uninitialized memory read from xp_backslash field.
  12. Solution:   Initialize xp_backslash field properly.
  13. Files:        src/eval.c, src/ex_docmd.c, src/ex_getln.c, src/misc1.c, src/tag.c
  14.  
  15.  
  16. *** ../vim60.177/src/eval.c    Mon Feb  4 17:08:29 2002
  17. --- src/eval.c    Mon Feb  4 22:02:26 2002
  18. ***************
  19. *** 3369,3374 ****
  20. --- 3369,3375 ----
  21.       if (argvars[1].var_type != VAR_UNKNOWN && get_var_number(&argvars[1]))
  22.           flags |= WILD_KEEP_ALL;
  23.       xpc.xp_context = EXPAND_FILES;
  24. +     xpc.xp_backslash = XP_BS_NONE;
  25.       retvar->var_val.var_string = ExpandOne(&xpc, s, NULL, flags, WILD_ALL);
  26.       }
  27.   }
  28. ***************
  29. *** 3907,3912 ****
  30. --- 3908,3914 ----
  31.       expand_T    xpc;
  32.   
  33.       xpc.xp_context = EXPAND_FILES;
  34. +     xpc.xp_backslash = XP_BS_NONE;
  35.       retvar->var_type = VAR_STRING;
  36.       retvar->var_val.var_string = ExpandOne(&xpc, get_var_string(&argvars[0]),
  37.                        NULL, WILD_USE_NL|WILD_SILENT, WILD_ALL);
  38. *** ../vim60.177/src/ex_docmd.c    Sun Feb  3 15:27:26 2002
  39. --- src/ex_docmd.c    Mon Feb  4 20:30:16 2002
  40. ***************
  41. *** 3315,3320 ****
  42. --- 3315,3321 ----
  43.               expand_T    xpc;
  44.   
  45.               xpc.xp_context = EXPAND_FILES;
  46. +             xpc.xp_backslash = XP_BS_NONE;
  47.               if ((p = ExpandOne(&xpc, eap->arg, NULL,
  48.                           WILD_LIST_NOTFOUND|WILD_ADD_SLASH,
  49.                              WILD_EXPAND_FREE)) == NULL)
  50. *** ../vim60.177/src/ex_getln.c    Wed Jan 16 12:28:44 2002
  51. --- src/ex_getln.c    Mon Feb  4 20:34:30 2002
  52. ***************
  53. *** 207,212 ****
  54. --- 207,213 ----
  55.       set_cmdspos();
  56.       }
  57.       xpc.xp_context = EXPAND_NOTHING;
  58. +     xpc.xp_backslash = XP_BS_NONE;
  59.   
  60.       /*
  61.        * Avoid scrolling when called by a recursive do_cmdline(), e.g. when
  62. ***************
  63. *** 2370,2376 ****
  64.    * options = WILD_SILENT:        don't print warning messages
  65.    * options = WILD_ESCAPE:        put backslash before special chars
  66.    *
  67. !  * The variable xp->xp_context must have been set!
  68.    */
  69.       char_u *
  70.   ExpandOne(xp, str, orig, options, mode)
  71. --- 2371,2377 ----
  72.    * options = WILD_SILENT:        don't print warning messages
  73.    * options = WILD_ESCAPE:        put backslash before special chars
  74.    *
  75. !  * The variables xp->xp_context and xp->xp_backslash must have been set!
  76.    */
  77.       char_u *
  78.   ExpandOne(xp, str, orig, options, mode)
  79. ***************
  80. *** 3403,3408 ****
  81. --- 3404,3410 ----
  82.       cmd_numfiles = -1;
  83.   
  84.       xpc.xp_context = EXPAND_FILES;
  85. +     xpc.xp_backslash = XP_BS_NONE;
  86.       ga_init2(&ga, 1, 100);
  87.   
  88.       /* Loop over all entries in {path}. */
  89. *** ../vim60.177/src/misc1.c    Mon Dec 31 17:47:49 2001
  90. --- src/misc1.c    Mon Feb  4 21:31:34 2002
  91. ***************
  92. *** 2968,2973 ****
  93. --- 2968,2974 ----
  94.               expand_T    xpc;
  95.   
  96.               xpc.xp_context = EXPAND_FILES;
  97. +             xpc.xp_backslash = XP_BS_NONE;
  98.               var = ExpandOne(&xpc, dst, NULL,
  99.                   WILD_ADD_SLASH|WILD_SILENT, WILD_EXPAND_FREE);
  100.               mustfree = TRUE;
  101. *** ../vim60.177/src/tag.c    Fri Sep 14 21:46:03 2001
  102. --- src/tag.c    Mon Feb  4 20:34:11 2002
  103. ***************
  104. *** 2711,2716 ****
  105. --- 2711,2717 ----
  106.       if (expand && mch_has_wildcard(fname))
  107.       {
  108.       xpc.xp_context = EXPAND_FILES;
  109. +     xpc.xp_backslash = XP_BS_NONE;
  110.       expanded_fname = ExpandOne(&xpc, (char_u *)fname, NULL,
  111.                   WILD_LIST_NOTFOUND|WILD_SILENT, WILD_EXPAND_FREE);
  112.       if (expanded_fname != NULL)
  113. *** ../vim60.177/src/version.c    Mon Feb  4 17:29:45 2002
  114. --- src/version.c    Mon Feb  4 22:27:51 2002
  115. ***************
  116. *** 608,609 ****
  117. --- 608,611 ----
  118.   {   /* Add new patch number below this line */
  119. + /**/
  120. +     178,
  121.   /**/
  122.  
  123. -- 
  124. hundred-and-one symptoms of being an internet addict:
  125. 206. You religiously respond immediately to e-mail, while ignoring
  126.      your growing pile of snail mail.
  127.  
  128.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  129. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  130.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  131.