From 603872c61f08c8d86bea2732d2cbf2ac56f25cb3 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 30 Nov 2000 19:10:04 +0000 Subject: ext2fs, ufs: 2000-11-30 Marcus Brinkmann * dir.c (diskfs_lookup_hard): If name is too long, clear DS before returning ENAMETOOLONG. pfinet: 2000-11-02 Marcus Brinkmann * tunnel.c (trivfs_S_io_get_owner): Add return type to silence compiler warning. --- ext2fs/ChangeLog | 5 +++++ ext2fs/dir.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'ext2fs') diff --git a/ext2fs/ChangeLog b/ext2fs/ChangeLog index 53247993..811973f5 100644 --- a/ext2fs/ChangeLog +++ b/ext2fs/ChangeLog @@ -1,3 +1,8 @@ +2000-11-30 Marcus Brinkmann + + * dir.c (diskfs_lookup_hard): If name is too long, clear + DS before returning ENAMETOOLONG. + 2000-10-01 Roland McGrath * inode.c (write_node): Use memcpy instead of a loop. diff --git a/ext2fs/dir.c b/ext2fs/dir.c index bc83d3b0..2887e1b0 100644 --- a/ext2fs/dir.c +++ b/ext2fs/dir.c @@ -161,7 +161,11 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, namelen = strlen (name); if (namelen > EXT2_NAME_LEN) - return ENAMETOOLONG; + { + if (ds) + diskfs_null_dirstat (ds); + return ENAMETOOLONG; + } try_again: if (ds) -- cgit v1.2.3