- Add several missing assertions documented on the MSDN page "Checked Build ASSERTs"
[reactos.git] / reactos / ntoskrnl / io / iomgr / iomdl.c
index a5fcf71..c6ca981 100644 (file)
@@ -29,6 +29,9 @@ IoAllocateMdl(IN PVOID VirtualAddress,
     ULONG Flags = 0;
     ULONG Size;
 
+    /* Make sure we got a valid length */
+    ASSERT(Length != 0);
+
     /* Fail if allocation is over 2GB */
     if (Length & 0x80000000) return NULL;