diff --git a/ChangeLog b/ChangeLog index 7918e73727ed3d069ed364f05c24a091ceb2d1b4..b0e9ca19a6d7d2ea809f2ba4317af0d85552be46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-02-06 Chris Allegretta <chrisa@asty.org> + * rcfile.c (parse_include): Abort on being unable to open an included rcfile. Fixes + Savannah bug 25490, nanorc: "include"ing a file which doesn't exist causes nano to segfault. + 2009-02-05 Chris Allegretta <chrisa@asty.org> * More color syntax speedups: Determine in reset_multis() whether we really need to call edit_refresh(). Additional global var edit_refresh_needed() to hopefully reduce diff --git a/src/rcfile.c b/src/rcfile.c index 5bbaa0f3da80e68896dcc9e11fbd7194d31f0c1e..d0d985c1a3635295898327b1ea0f32d692708e25 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -495,6 +495,7 @@ void parse_include(char *ptr) if ((rcstream = fopen(option, "rb")) == NULL) { rcfile_error(_("Error reading %s: %s"), option, strerror(errno)); + return; } /* Use the name and line number position of the new syntax file