I have a large (4 meg) powerpoint file that is corrupted if I save it
through our dokan file system. I have tracked this down to a write with
length 0 failing, because both the Irp->MdlAddress and the Irp->UserBuffer
ar null. I believe the write should succeed in this case. Here's a patch
that fixes the problem for me:
Index: write.c
===================================================================
--- write.c (revision 67)
+++ write.c (working copy)
@@ -78,6 +78,11 @@
__leave;
}
+ if (irpSp->Parameters.Write.Length == 0) {
+ status = STATUS_SUCCESS;
+ __leave;
+ }
+
if (Irp->MdlAddress) {
DDbgPrint(" use MdlAddress\n");
buffer = MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority);
@@ -92,11 +97,6 @@
__leave;
}
- if (irpSp->Parameters.Write.Length == 0) {
- status = STATUS_SUCCESS;
- __leave;
- }
-
// the length of EventContext is sum of length to write and length of
file name
eventLength = sizeof(EVENT_CONTEXT)
+ irpSp->Parameters.Write.Length
Original issue reported on code.google.com by t.s.mae...@gmail.com on 2 Feb 2010 at 3:24
Original issue reported on code.google.com by
t.s.mae...@gmail.com
on 2 Feb 2010 at 3:24