mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +00:00
- A long long time ago there was a stupid kernel that created MDLs for R/W requests even when the length of the buffer was 0. He had another stupid friend called CDFS which attempted to read the MDL before checking if the buffer size is also 0. When cdfs's friend, the kernel, grew smarter and stopped allocating MDLs, cdfs didn't catch on and cried every time this happened. CDFS now caught up. (thanks to Greatlord for finding the regression).
svn path=/trunk/; revision=22958
This commit is contained in:
parent
1058843806
commit
e7e794c543
1 changed files with 2 additions and 2 deletions
|
@ -140,7 +140,7 @@ CdfsRead(PDEVICE_OBJECT DeviceObject,
|
|||
PDEVICE_EXTENSION DeviceExt;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PFILE_OBJECT FileObject;
|
||||
PVOID Buffer;
|
||||
PVOID Buffer = NULL;
|
||||
ULONG ReadLength;
|
||||
LARGE_INTEGER ReadOffset;
|
||||
ULONG ReturnedReadLength = 0;
|
||||
|
@ -154,7 +154,7 @@ CdfsRead(PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
ReadLength = Stack->Parameters.Read.Length;
|
||||
ReadOffset = Stack->Parameters.Read.ByteOffset;
|
||||
Buffer = MmGetSystemAddressForMdl(Irp->MdlAddress);
|
||||
if (ReadLength) Buffer = MmGetSystemAddressForMdl(Irp->MdlAddress);
|
||||
|
||||
Status = CdfsReadFile(DeviceExt,
|
||||
FileObject,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue