From c422df494380b3de644ed61d8a242dba90e228bf Mon Sep 17 00:00:00 2001
From: dt
Date: Sat, 9 May 1998 09:36:38 +0000
Subject: [PATCH] Fix off by ane error in previous commit.
This caused following commands:
mkdir z
cd z
touch A B
mv B A
corrupt the '..' entry in 'z'.
Reported by: bde
---
sys/fs/msdosfs/msdosfs_lookup.c | 4 ++--
sys/msdosfs/msdosfs_lookup.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c
index 54bcce18466..4ac78488bb1 100644
--- a/sys/fs/msdosfs/msdosfs_lookup.c
+++ b/sys/fs/msdosfs/msdosfs_lookup.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_lookup.c,v 1.21 1998/02/24 14:13:13 ache Exp $ */
+/* $Id: msdosfs_lookup.c,v 1.22 1998/02/26 06:45:44 msmith Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.37 1997/11/17 15:36:54 ws Exp $ */
/*-
@@ -294,7 +294,7 @@ msdosfs_lookup(ap)
* this lookup.
*/
dp->de_fndoffset = diroff;
- dp->de_fndcnt = wincnt;
+ dp->de_fndcnt = wincnt - 1;
goto found;
}
diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c
index 54bcce18466..4ac78488bb1 100644
--- a/sys/msdosfs/msdosfs_lookup.c
+++ b/sys/msdosfs/msdosfs_lookup.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_lookup.c,v 1.21 1998/02/24 14:13:13 ache Exp $ */
+/* $Id: msdosfs_lookup.c,v 1.22 1998/02/26 06:45:44 msmith Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.37 1997/11/17 15:36:54 ws Exp $ */
/*-
@@ -294,7 +294,7 @@ msdosfs_lookup(ap)
* this lookup.
*/
dp->de_fndoffset = diroff;
- dp->de_fndcnt = wincnt;
+ dp->de_fndcnt = wincnt - 1;
goto found;
}
--
2.45.2