2001-08-20 Roland McGrath <roland@frob.com>
authorRoland McGrath <roland@gnu.org>
Wed, 22 Aug 2001 23:12:51 +0000 (23:12 +0000)
committerRoland McGrath <roland@gnu.org>
Wed, 22 Aug 2001 23:12:51 +0000 (23:12 +0000)
* hurd/hurdlookup.c (__hurd_file_name_lookup): Fail with ENOENT for "".
(__hurd_file_name_split, __hurd_directory_name_split): Likewise.

hurd/hurdlookup.c

index 0426d97..c1f6ad7 100644 (file)
@@ -63,6 +63,9 @@ __hurd_file_name_lookup (error_t (*use_init_port)
   if (! lookup)
     lookup = __dir_lookup;
 
+  if (file_name[0] == '\0')
+    return ENOENT;
+
   startport = (file_name[0] == '/') ? INIT_PORT_CRDIR : INIT_PORT_CWDIR;
   while (file_name[0] == '/')
     file_name++;