From f66818fe3a2c568faa9afe6d72339a57b1d0d621 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Mon, 29 Jun 1998 23:28:19 +0000 Subject: Mon Jun 29 18:54:23 1998 Thomas Bushnell, n/BSG * lookup.c (diskfs_lookup): If NAME is empty, return an error. --- libdiskfs/ChangeLog | 4 ++++ libdiskfs/lookup.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'libdiskfs') diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index e0c68166..b1018988 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,7 @@ +Mon Jun 29 18:54:23 1998 Thomas Bushnell, n/BSG + + * lookup.c (diskfs_lookup): If NAME is empty, return an error. + Tue May 12 12:08:35 1998 Thomas Bushnell, n/BSG * file-get-trans.c (diskfs_S_file_get_translator) [S_ISCHR || diff --git a/libdiskfs/lookup.c b/libdiskfs/lookup.c index df8b4bff..71d8dbf8 100644 --- a/libdiskfs/lookup.c +++ b/libdiskfs/lookup.c @@ -1,5 +1,5 @@ /* Wrapper for diskfs_lookup_hard - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -93,6 +93,12 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type, return ENOTDIR; } + if (name[0] == '\0') + { + diskfs_null_dirstat (ds); + return EINVAL; + } + err = fshelp_access (&dp->dn_stat, S_IEXEC, cred->user); if (err) { -- cgit v1.2.3