Index: /branches/VBox-6.1/src/VBox/Storage/VHD.cpp
===================================================================
--- /branches/VBox-6.1/src/VBox/Storage/VHD.cpp	(revision 146627)
+++ /branches/VBox-6.1/src/VBox/Storage/VHD.cpp	(revision 146628)
@@ -1640,5 +1640,5 @@
     Assert(!(cbToWrite % VHD_SECTOR_SIZE));
     AssertReturn((VALID_PTR(pIoCtx) && cbToWrite), VERR_INVALID_PARAMETER);
-    AssertReturn(uOffset + cbToWrite <= pImage->cbSize, VERR_INVALID_PARAMETER);
+    AssertReturn(uOffset + cbToWrite <= RT_ALIGN_64(pImage->cbSize, pImage->cbDataBlock), VERR_INVALID_PARAMETER); /* The image size might not be on a data block size boundary. */
 
     if (pImage->pBlockAllocationTable)
