Rico Schüller : d3dx9: Add argument check to D3DXCreateBuffer().
Alexandre Julliard
julliard at winehq.org
Mon Apr 4 10:10:56 CDT 2011
Module: wine
Branch: master
Commit: 1fcce55894c6a79e2f85def1875784a4f4baa40a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1fcce55894c6a79e2f85def1875784a4f4baa40a
Author: Rico Schüller <kgbricola at web.de>
Date: Fri Apr 1 15:00:11 2011 +0200
d3dx9: Add argument check to D3DXCreateBuffer().
---
dlls/d3dx9_36/core.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c
index 06a8305..8947970 100644
--- a/dlls/d3dx9_36/core.c
+++ b/dlls/d3dx9_36/core.c
@@ -137,6 +137,12 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD size, LPD3DXBUFFER *buffer)
struct ID3DXBufferImpl *object;
HRESULT hr;
+ if (!buffer)
+ {
+ WARN("Invalid buffer specified.\n");
+ return D3DERR_INVALIDCALL;
+ }
+
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
{
More information about the wine-cvs
mailing list