diff options
author | Miles Bader <miles@gnu.org> | 1996-01-15 22:33:07 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-01-15 22:33:07 +0000 |
commit | 37f4016249fc11836d64cb80da3857b1d0679e28 (patch) | |
tree | 8fbfd88d099ef055ffc4683e30069819663dcf15 | |
parent | cd24cb884f5ae0787e9f9094e7d5a5447c369271 (diff) |
(diskfs_direnter):
Don't include the terminating '\0' in on-disk directory entry names.
-rw-r--r-- | ext2fs/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
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: |