Index: /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c	(revision 33731)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c	(revision 33732)
@@ -48,4 +48,10 @@
     HRESULT hr;
 
+    if (levels > MAX_MIP_LEVELS)
+    {
+        WARN("Too many texture levels %d", levels);
+        return WINED3DERR_INVALIDCALL;
+    }
+
     hr = resource_init((IWineD3DResource *)texture, resource_type, device,
             size, usage, format_desc, pool, parent, parent_ops
