From afd1ddbe0d34ea2ab2bd9867aedf3e1cf9f41f8f Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 23 Nov 2012 11:47:35 +0800 Subject: [PATCH] windowscodecs: Add a NULL check to GetFrameCount of the BMP decoder. --- dlls/windowscodecs/bmpdecode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/windowscodecs/bmpdecode.c b/dlls/windowscodecs/bmpdecode.c index 7b3f82dac56..54de0f1b1a7 100644 --- a/dlls/windowscodecs/bmpdecode.c +++ b/dlls/windowscodecs/bmpdecode.c @@ -1113,6 +1113,8 @@ static HRESULT WINAPI BmpDecoder_GetThumbnail(IWICBitmapDecoder *iface, static HRESULT WINAPI BmpDecoder_GetFrameCount(IWICBitmapDecoder *iface, UINT *pCount) { + if (!pCount) return E_INVALIDARG; + *pCount = 1; return S_OK; }