Henri Verbeet : ddraw: Disallow user memory surfaces before version 4.
Alexandre Julliard
julliard at winehq.org
Wed Mar 5 14:12:31 CST 2014
Module: wine
Branch: master
Commit: 76ab86ee7f1e17bbe0fe8fbca3e7b2afa3418b00
URL: http://source.winehq.org/git/wine.git/?a=commit;h=76ab86ee7f1e17bbe0fe8fbca3e7b2afa3418b00
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Mar 5 10:46:36 2014 +0100
ddraw: Disallow user memory surfaces before version 4.
---
dlls/ddraw/surface.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index bf49e15..13aa813 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5821,6 +5821,13 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
return DDERR_INVALIDCAPS;
}
+ if (version < 4)
+ {
+ WARN("User memory surfaces not supported before version 4.\n");
+ HeapFree(GetProcessHeap(), 0, texture);
+ return DDERR_INVALIDPARAMS;
+ }
+
if (!(desc->dwFlags & DDSD_PITCH))
{
WARN("User memory surfaces should explicitly specify the pitch.\n");
More information about the wine-cvs
mailing list