65744Re: [PATCH] Fix segfault in home_replace() when $HOME is unset
- Jul 6, 2012Chris Webb wrote:
> home_replace() calls vim_strchr() on the result of mch_getenv("HOME")Thanks, I'll include it right away.
> without checking for a NULL value. If $HOME is unset, this causes a segfault
> reproducible with 'env -i src/vim /etc/passwd'. (Introduced in v7-3-559.)
> Fix by guarding vim_strstr(homedir_env, ...) with homedir_env != NULL.
From "know your smileys":
% Bike accident. A bit far-fetched, I suppose; although...
o _ _ _
_o /\_ _ \\o (_)\__/o (_)
_< \_ _>(_) (_)/<_ \_| \ _|/' \/
(_)>(_) (_) (_) (_) (_)' _\o_
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
- << Previous post in topic Next post in topic >>