Update NTOSKRNL/CC/ccpinsupport.cpp
Loop was prematurely terminating due to wrong condition
of if(BeyondLastByte.QuadPart < LocalFileOffset.QuadPart + RemainingLength)
we are mapping across the length,
itroduced some guard checks
if(localbcb != nullptr)
{
CcSetDirtyPinnedData(localbcb, nullptr);
*Bcb = localbcb;
} to fix some test case where it was failing
This commit is contained in:
committed by
CodingWorkshop Signing Team
parent
10527bf405
commit
47bfb48ebb
@@ -795,7 +795,7 @@ CcPreparePinWrite(
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(BeyondLastByte.QuadPart < LocalFileOffset.QuadPart + RemainingLength)
|
if(BeyondLastByte.QuadPart > LocalFileOffset.QuadPart + RemainingLength)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -810,8 +810,11 @@ CcPreparePinWrite(
|
|||||||
RtlZeroMemory(*Buffer, Length);
|
RtlZeroMemory(*Buffer, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(localbcb != nullptr)
|
||||||
|
{
|
||||||
CcSetDirtyPinnedData(localbcb, nullptr);
|
CcSetDirtyPinnedData(localbcb, nullptr);
|
||||||
*Bcb = localbcb;
|
*Bcb = localbcb;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user