From 1fcce55894c6a79e2f85def1875784a4f4baa40a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rico=20Sch=C3=BCller?= Date: Fri, 1 Apr 2011 15:00:11 +0200 Subject: [PATCH] d3dx9: Add argument check to D3DXCreateBuffer(). --- dlls/d3dx9_36/core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c index 06a83059fe6..894797066d1 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) { -- 2.11.4.GIT