diff --git a/NTOSKRNL/CC/ccpinsupport.cpp b/NTOSKRNL/CC/ccpinsupport.cpp index 1173f42..da6aea3 100644 --- a/NTOSKRNL/CC/ccpinsupport.cpp +++ b/NTOSKRNL/CC/ccpinsupport.cpp @@ -795,7 +795,7 @@ CcPreparePinWrite( } return false; } - if(BeyondLastByte.QuadPart < LocalFileOffset.QuadPart + RemainingLength) + if(BeyondLastByte.QuadPart > LocalFileOffset.QuadPart + RemainingLength) break; } @@ -810,8 +810,11 @@ CcPreparePinWrite( RtlZeroMemory(*Buffer, Length); } + if(localbcb != nullptr) + { CcSetDirtyPinnedData(localbcb, nullptr); *Bcb = localbcb; + } return true; }