From c44024f1e0be0065a43e87b81c187e0c43b04ab7 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 23 Nov 2012 11:49:09 +0800 Subject: [PATCH] windowscodecs: Add a NULL check to GetFrameCount of the JPEG decoder. --- dlls/windowscodecs/jpegformat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index eab50f02cd1..e9c722e5197 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -430,6 +430,8 @@ static HRESULT WINAPI JpegDecoder_GetThumbnail(IWICBitmapDecoder *iface, static HRESULT WINAPI JpegDecoder_GetFrameCount(IWICBitmapDecoder *iface, UINT *pCount) { + if (!pCount) return E_INVALIDARG; + *pCount = 1; return S_OK; }