Index: /trunk/src/VBox/Devices/Graphics/DevVGA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 15976)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 15977)
@@ -5820,4 +5820,6 @@
                     return VERR_VGA_INVALID_CUSTOM_MODE;
                 }
+                /* Round up the X resolution to a multiple of eight. */
+                cx = (cx + 7) & ~7;
 # ifdef VRAM_SIZE_FIX
                 if (cx * cy * cBits / 8 >= pThis->vram_size)
