From 37f4016249fc11836d64cb80da3857b1d0679e28 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 15 Jan 1996 22:33:07 +0000 Subject: (diskfs_direnter): Don't include the terminating '\0' in on-disk directory entry names. --- ext2fs/dir.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext2fs') diff --git a/ext2fs/dir.c b/ext2fs/dir.c index dc6cfc37..06125d70 100644 --- a/ext2fs/dir.c +++ b/ext2fs/dir.c @@ -492,7 +492,7 @@ diskfs_direnter(struct node *dp, ds->entry->inode = np->dn->number; ds->entry->name_len = namelen; - bcopy (name, ds->entry->name, namelen + 1); + bcopy (name, ds->entry->name, namelen); break; @@ -507,7 +507,7 @@ diskfs_direnter(struct node *dp, new->inode = np->dn->number; new->rec_len = ds->entry->rec_len - oldneeded; new->name_len = namelen; - bcopy (name, new->name, namelen + 1); + bcopy (name, new->name, namelen); ds->entry->rec_len = oldneeded; @@ -545,7 +545,7 @@ diskfs_direnter(struct node *dp, new->inode = np->dn->number; new->rec_len = totfreed; new->name_len = namelen; - bcopy (name, new->name, namelen + 1); + bcopy (name, new->name, namelen); break; case EXTEND: @@ -571,7 +571,7 @@ diskfs_direnter(struct node *dp, new->inode = np->dn->number; new->rec_len = DIRBLKSIZ; new->name_len = namelen; - bcopy (name, new->name, namelen + 1); + bcopy (name, new->name, namelen); break; default: -- cgit v1.2.3