Karsten Hopp wrote:

> We've rebuilt all Fedora-12 packages and vim was one of the programs 
> that failed to
> run with enhanced glibc fortify features:
> 
> vi
> *** buffer overflow detected ***: vim terminated
> ======= Backtrace: =========
> /lib64/libc.so.6(__fortify_fail+0x37)[0x7f780f90df47]
> /lib64/libc.so.6[0x7f780f90bee0]
> vim(eval_init+0x6f)[0x45a5cf]
> vim(main+0x82)[0x4ac952]
> /lib64/libc.so.6(__libc_start_main+0xfd)[0x7f780f835aed]
> vim[0x422069]
> 
> 
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=514717 has all the details 
> and 2 suggested fixes.

What Vim does is completely fine.  So your library is broken.  I
understand that it's intentionally broken to find buffer overflows.

Now, we could work around the broken library.  The diff shows one
solution.  But this would actually be needed in many more places, it
just fixes the one found on startup.  When running Vim there are more.
Takes a long time to find them all.

A proper fix would be:
- Add configure check for the broken library.
- When the library is broken use another function instead of STRCPY() to
  avoid using the broken strcpy().  It's slower but should work.

A better solution would be to tell the library not to have this check
for what it guessed the destination size would be.  Is there an option
or #define for this?

-- 
hundred-and-one symptoms of being an internet addict:
144. You eagerly await the update of the "Cool Site of the Day."

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui