diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-04-08 17:41:48 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-04-08 17:41:48 +0200 |
| commit | 79886caeb4bf17b01fcc42c0891a61bcd5863a75 (patch) | |
| tree | d98c7f7bd4cf5b425c7783e6402d1f28d15c63ab /Private/Source | |
| parent | 7ec2bda484072982e75666508863ef9903331191 (diff) | |
Kernel: Thoroughly document code.
Diffstat (limited to 'Private/Source')
| -rw-r--r-- | Private/Source/KernelHeap.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Private/Source/KernelHeap.cxx b/Private/Source/KernelHeap.cxx index 0f2f57dd..72d291a8 100644 --- a/Private/Source/KernelHeap.cxx +++ b/Private/Source/KernelHeap.cxx @@ -127,15 +127,15 @@ Boolean ke_is_valid_heap(VoidPtr heapPtr) { } /// @brief Protect the heap pointer with a CRC32. -/// @param heapPtr -/// @return +/// @param heapPtr HIB pointer. +/// @return if it valid: point has crc now., otherwise fail. Boolean ke_protect_ke_heap(VoidPtr heapPtr) { if (heapPtr) { Detail::HeapInformationBlockPtr virtualAddress = reinterpret_cast<Detail::HeapInformationBlockPtr>( (UIntPtr)heapPtr - sizeof(Detail::HeapInformationBlock)); - if (virtualAddress->fPresent && virtualAddress->fMagic == kKernelHeapMagic) { + if (virtualAddress->fPresent && kKernelHeapMagic == virtualAddress->fMagic) { virtualAddress->fCRC32 = ke_calculate_crc32((Char *)heapPtr, virtualAddress->fTargetPtrSize); return true; |
