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:
parent
fc04ab53c9
commit
abb7e5b790
@ -356,6 +356,17 @@ deget(pmp, dirclust, diroffset, depp)
|
|||||||
*/
|
*/
|
||||||
u_long size;
|
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;
|
nvp->v_type = VDIR;
|
||||||
if (ldep->de_StartCluster != MSDOSFSROOT) {
|
if (ldep->de_StartCluster != MSDOSFSROOT) {
|
||||||
error = pcbmap(ldep, 0xffff, 0, &size, 0);
|
error = pcbmap(ldep, 0xffff, 0, &size, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user