* rcfile.c (parse_rcfile), initialize size argument to getline(), fixes crash on FreeBSD

reported by Eitan Adler <eitanadlerlist@gmail.com>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4445 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2009-11-27 05:09:56 +00:00
parent 3b830ee194
commit dcf5cbbf6a
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
2009-11-26 Chris Allegretta <chrisa@asty.org>
* winio.c (edit_scroll): Adjust for long lines when scrolling.
* rcfile.c (parse_rcfile), initialize size argument to getline(), fixes crash on FreeBSD
reported by Eitan Adler <eitanadlerlist@gmail.com>.
2009-11-26 Jordi Mallach <jordi@gnu.org>
* doc/man/*: Update all man pages to escape unescapred hyphens.

View File

@ -892,7 +892,7 @@ void parse_rcfile(FILE *rcstream
{
char *buf = NULL;
ssize_t len;
size_t n;
size_t n = 0;
while ((len = getline(&buf, &n, rcstream)) > 0) {
char *ptr, *keyword, *option;