vim/7.1.039

40 lines
1.1 KiB
Plaintext

To: vim-dev@vim.org
Subject: patch 7.1.039
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 7.1.039
Problem: A tag in a help file that starts with "help-tags" and contains a
percent sign may make Vim crash. (Ulf Harnhammar)
Solution: Use puts() instead of fprintf().
Files: src/ex_cmds.c
*** ../vim-7.1.038/src/ex_cmds.c Tue Jul 24 11:15:46 2007
--- src/ex_cmds.c Wed Jul 25 20:06:20 2007
***************
*** 6374,6382 ****
for (i = 0; i < ga.ga_len; ++i)
{
s = ((char_u **)ga.ga_data)[i];
! if (STRNCMP(s, "help-tags", 9) == 0)
/* help-tags entry was added in formatted form */
! fprintf(fd_tags, (char *)s);
else
{
fprintf(fd_tags, "%s\t/*", s);
--- 6374,6382 ----
for (i = 0; i < ga.ga_len; ++i)
{
s = ((char_u **)ga.ga_data)[i];
! if (STRNCMP(s, "help-tags\t", 10) == 0)
/* help-tags entry was added in formatted form */
! fputs((char *)s, fd_tags);
else
{
fprintf(fd_tags, "%s\t/*", s);