mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTFS]
Fix a really nasty bug in NTFS: it was possible to perform a buffer overflow when reading the bitmap data. svn path=/trunk/; revision=65186
This commit is contained in:
parent
760375811e
commit
b304d6f14a
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ NtfsGetFreeClusters(PDEVICE_EXTENSION DeviceExt)
|
|||
|
||||
BitmapDataSize = AttributeDataLength(&DataContext->Record);
|
||||
ASSERT((BitmapDataSize * 8) >= (DeviceExt->NtfsInfo.SectorCount / DeviceExt->NtfsInfo.SectorsPerCluster));
|
||||
BitmapData = ExAllocatePoolWithTag(NonPagedPool, BitmapDataSize, TAG_NTFS);
|
||||
BitmapData = ExAllocatePoolWithTag(NonPagedPool, ROUND_UP(BitmapDataSize, DeviceExt->NtfsInfo.BytesPerSector), TAG_NTFS);
|
||||
if (BitmapData == NULL)
|
||||
{
|
||||
ReleaseAttributeContext(DataContext);
|
||||
|
|
Loading…
Reference in a new issue