1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00

When a cluster entry for ``.'' is set to 0, msdosfs fails to handle it

correctly.

PR:		24393
Submitted by:	semenu
Approved by:	rwatson (mentor)
MFC after:	1 week
This commit is contained in:
Tom Rhodes 2002-08-16 05:13:42 +00:00
parent 8c71ce8a4e
commit b5cdbc6dae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101967

View File

@ -356,6 +356,17 @@ deget(pmp, dirclust, diroffset, depp)
*/
u_long size;
/*
* XXX Sometimes, these arrives that . entry have cluster
* number 0, when it shouldn't. Use real cluster number
* instead of what is written in directory entry.
*/
if ((diroffset == 0) && (ldep->de_StartCluster != dirclust)) {
printf("deget(): . entry at clust %ld != %ld\n",
dirclust, ldep->de_StartCluster);
ldep->de_StartCluster = dirclust;
}
nvp->v_type = VDIR;
if (ldep->de_StartCluster != MSDOSFSROOT) {
error = pcbmap(ldep, 0xffff, 0, &size, 0);