aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--readline/ChangeLog6
-rw-r--r--readline/readline.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/readline/ChangeLog b/readline/ChangeLog
index e0ad03b..fcbba49 100644
--- a/readline/ChangeLog
+++ b/readline/ChangeLog
@@ -1,3 +1,9 @@
+Thu Feb 20 23:23:16 1992 Stu Grossman (grossman at cygnus.com)
+
+ * readline.c (rl_read_init_file): Make sure that null filename is
+ not passed to open() or else we end up opening the directory, and
+ read a bunch of garbage into keymap[].
+
Mon Feb 17 17:15:09 1992 Fred Fish (fnf at cygnus.com)
* readline.c (readline_default_bindings): Only make use of VLNEXT
diff --git a/readline/readline.c b/readline/readline.c
index cfe0fec..a1b4a53 100644
--- a/readline/readline.c
+++ b/readline/readline.c
@@ -5484,6 +5484,9 @@ rl_read_init_file (filename)
openname = tilde_expand (filename);
+ if (!openname || *openname == '\000')
+ return ENOENT;
+
if ((stat (openname, &finfo) < 0) ||
(file = open (openname, O_RDONLY, 0666)) < 0)
{