* readline.c (rl_read_init_file): Make sure that null filename is
authorStu Grossman <grossman@cygnus>
Fri, 21 Feb 1992 07:28:31 +0000 (07:28 +0000)
committerStu Grossman <grossman@cygnus>
Fri, 21 Feb 1992 07:28:31 +0000 (07:28 +0000)
not passed to open() or else we end up opening the directory, and
read a bunch of garbage into keymap[].

readline/ChangeLog
readline/readline.c

index e0ad03bade6be0bdf960ed7748d28cb8bbc2e41f..fcbba4900e55412c986a483bf112288a482db36a 100644 (file)
@@ -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
index cfe0fec4a056c6abdb3f4919b33391303882b557..a1b4a53da0353601bafc970ac15b56b8c1824af3 100644 (file)
@@ -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)
     {
This page took 0.028152 seconds and 4 git commands to generate.